* [dtor-input:next 134/135] drivers/input/joystick/adc-joystick.c:194:10: error: call to undeclared function 'min_array'; ISO C99 and later do not support implicit function declarations
@ 2024-01-19 22:01 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-01-19 22:01 UTC (permalink / raw)
To: Chris Morgan; +Cc: llvm, oe-kbuild-all, linux-input, Dmitry Torokhov
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
head: 3af6e24a456437d323d1080bd254053f7af05234
commit: 6380a59c534ecab1462608a1f76490289a45a377 [134/135] Input: adc-joystick - handle inverted axes
config: i386-randconfig-001-20240120 (https://download.01.org/0day-ci/archive/20240120/202401200525.sV9c5cWM-lkp@intel.com/config)
compiler: ClangBuiltLinux clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240120/202401200525.sV9c5cWM-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401200525.sV9c5cWM-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/input/joystick/adc-joystick.c:194:10: error: call to undeclared function 'min_array'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
194 | min_array(axes[i].range, 2),
| ^
>> drivers/input/joystick/adc-joystick.c:195:10: error: call to undeclared function 'max_array'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
195 | max_array(axes[i].range, 2),
| ^
2 errors generated.
vim +/min_array +194 drivers/input/joystick/adc-joystick.c
135
136 static int adc_joystick_set_axes(struct device *dev, struct adc_joystick *joy)
137 {
138 struct adc_joystick_axis *axes;
139 struct fwnode_handle *child;
140 int num_axes, error, i;
141
142 num_axes = device_get_child_node_count(dev);
143 if (!num_axes) {
144 dev_err(dev, "Unable to find child nodes\n");
145 return -EINVAL;
146 }
147
148 if (num_axes != joy->num_chans) {
149 dev_err(dev, "Got %d child nodes for %d channels\n",
150 num_axes, joy->num_chans);
151 return -EINVAL;
152 }
153
154 axes = devm_kmalloc_array(dev, num_axes, sizeof(*axes), GFP_KERNEL);
155 if (!axes)
156 return -ENOMEM;
157
158 device_for_each_child_node(dev, child) {
159 error = fwnode_property_read_u32(child, "reg", &i);
160 if (error) {
161 dev_err(dev, "reg invalid or missing\n");
162 goto err_fwnode_put;
163 }
164
165 if (i >= num_axes) {
166 error = -EINVAL;
167 dev_err(dev, "No matching axis for reg %d\n", i);
168 goto err_fwnode_put;
169 }
170
171 error = fwnode_property_read_u32(child, "linux,code",
172 &axes[i].code);
173 if (error) {
174 dev_err(dev, "linux,code invalid or missing\n");
175 goto err_fwnode_put;
176 }
177
178 error = fwnode_property_read_u32_array(child, "abs-range",
179 axes[i].range, 2);
180 if (error) {
181 dev_err(dev, "abs-range invalid or missing\n");
182 goto err_fwnode_put;
183 }
184
185 if (axes[i].range[0] > axes[i].range[1]) {
186 dev_dbg(dev, "abs-axis %d inverted\n", i);
187 axes[i].inverted = true;
188 }
189
190 fwnode_property_read_u32(child, "abs-fuzz", &axes[i].fuzz);
191 fwnode_property_read_u32(child, "abs-flat", &axes[i].flat);
192
193 input_set_abs_params(joy->input, axes[i].code,
> 194 min_array(axes[i].range, 2),
> 195 max_array(axes[i].range, 2),
196 axes[i].fuzz, axes[i].flat);
197 input_set_capability(joy->input, EV_ABS, axes[i].code);
198 }
199
200 joy->axes = axes;
201
202 return 0;
203
204 err_fwnode_put:
205 fwnode_handle_put(child);
206 return error;
207 }
208
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-19 22:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-19 22:01 [dtor-input:next 134/135] drivers/input/joystick/adc-joystick.c:194:10: error: call to undeclared function 'min_array'; ISO C99 and later do not support implicit function declarations kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox