Hi Andy, I love your patch! Perhaps something to improve: [auto build test WARNING on dtor-input/next] [also build test WARNING on hid/for-next linus/master v6.0-rc6 next-20220923] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/Input-matrix_keypad-add-missed-header-inclusion/20220924-024709 base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next config: i386-randconfig-a004 compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/baec96dd9b994bf310565d1eca5eb476fa9c0fd3 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Andy-Shevchenko/Input-matrix_keypad-add-missed-header-inclusion/20220924-024709 git checkout baec96dd9b994bf310565d1eca5eb476fa9c0fd3 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/input/keyboard/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/input/keyboard/lm8333.c:95:3: error: implicit declaration of function 'input_event' is invalid in C99 [-Werror,-Wimplicit-function-declaration] input_event(input, EV_MSC, MSC_SCAN, code); ^ drivers/input/keyboard/lm8333.c:95:22: error: use of undeclared identifier 'EV_MSC' input_event(input, EV_MSC, MSC_SCAN, code); ^ drivers/input/keyboard/lm8333.c:95:30: error: use of undeclared identifier 'MSC_SCAN' input_event(input, EV_MSC, MSC_SCAN, code); ^ drivers/input/keyboard/lm8333.c:96:3: error: implicit declaration of function 'input_report_key' is invalid in C99 [-Werror,-Wimplicit-function-declaration] input_report_key(input, lm8333->keycodes[code], pressed); ^ drivers/input/keyboard/lm8333.c:99:2: error: implicit declaration of function 'input_sync' is invalid in C99 [-Werror,-Wimplicit-function-declaration] input_sync(input); ^ drivers/input/keyboard/lm8333.c:99:2: note: did you mean 'mmput_async'? include/linux/sched/mm.h:114:6: note: 'mmput_async' declared here void mmput_async(struct mm_struct *); ^ drivers/input/keyboard/lm8333.c:147:10: error: implicit declaration of function 'input_allocate_device' is invalid in C99 [-Werror,-Wimplicit-function-declaration] input = input_allocate_device(); ^ >> drivers/input/keyboard/lm8333.c:147:8: warning: incompatible integer to pointer conversion assigning to 'struct input_dev *' from 'int' [-Wint-conversion] input = input_allocate_device(); ^ ~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/keyboard/lm8333.c:156:7: error: incomplete definition of type 'struct input_dev' input->name = client->name; ~~~~~^ include/linux/input/matrix_keypad.h:8:8: note: forward declaration of 'struct input_dev' struct input_dev; ^ drivers/input/keyboard/lm8333.c:157:7: error: incomplete definition of type 'struct input_dev' input->dev.parent = &client->dev; ~~~~~^ include/linux/input/matrix_keypad.h:8:8: note: forward declaration of 'struct input_dev' struct input_dev; ^ drivers/input/keyboard/lm8333.c:158:7: error: incomplete definition of type 'struct input_dev' input->id.bustype = BUS_I2C; ~~~~~^ include/linux/input/matrix_keypad.h:8:8: note: forward declaration of 'struct input_dev' struct input_dev; ^ drivers/input/keyboard/lm8333.c:158:22: error: use of undeclared identifier 'BUS_I2C' input->id.bustype = BUS_I2C; ^ drivers/input/keyboard/lm8333.c:160:2: error: implicit declaration of function 'input_set_capability' is invalid in C99 [-Werror,-Wimplicit-function-declaration] input_set_capability(input, EV_MSC, MSC_SCAN); ^ drivers/input/keyboard/lm8333.c:160:30: error: use of undeclared identifier 'EV_MSC' input_set_capability(input, EV_MSC, MSC_SCAN); ^ drivers/input/keyboard/lm8333.c:160:38: error: use of undeclared identifier 'MSC_SCAN' input_set_capability(input, EV_MSC, MSC_SCAN); ^ drivers/input/keyboard/lm8333.c:188:8: error: implicit declaration of function 'input_register_device' is invalid in C99 [-Werror,-Wimplicit-function-declaration] err = input_register_device(input); ^ drivers/input/keyboard/lm8333.c:188:8: note: did you mean 'i2c_unregister_device'? include/linux/i2c.h:489:6: note: 'i2c_unregister_device' declared here void i2c_unregister_device(struct i2c_client *client); ^ drivers/input/keyboard/lm8333.c:198:2: error: implicit declaration of function 'input_free_device' is invalid in C99 [-Werror,-Wimplicit-function-declaration] input_free_device(input); ^ drivers/input/keyboard/lm8333.c:208:2: error: implicit declaration of function 'input_unregister_device' is invalid in C99 [-Werror,-Wimplicit-function-declaration] input_unregister_device(lm8333->input); ^ drivers/input/keyboard/lm8333.c:208:2: note: did you mean 'i2c_unregister_device'? include/linux/i2c.h:489:6: note: 'i2c_unregister_device' declared here void i2c_unregister_device(struct i2c_client *client); ^ 1 warning and 16 errors generated. vim +147 drivers/input/keyboard/lm8333.c 0bf25a45386f28 Wolfram Sang 2012-04-03 127 5298cc4cc753bb Bill Pemberton 2012-11-23 128 static int lm8333_probe(struct i2c_client *client, 0bf25a45386f28 Wolfram Sang 2012-04-03 129 const struct i2c_device_id *id) 0bf25a45386f28 Wolfram Sang 2012-04-03 130 { c838cb3d477f79 Jingoo Han 2013-12-05 131 const struct lm8333_platform_data *pdata = c838cb3d477f79 Jingoo Han 2013-12-05 132 dev_get_platdata(&client->dev); 0bf25a45386f28 Wolfram Sang 2012-04-03 133 struct lm8333 *lm8333; 0bf25a45386f28 Wolfram Sang 2012-04-03 134 struct input_dev *input; 0bf25a45386f28 Wolfram Sang 2012-04-03 135 int err, active_time; 0bf25a45386f28 Wolfram Sang 2012-04-03 136 0bf25a45386f28 Wolfram Sang 2012-04-03 137 if (!pdata) 0bf25a45386f28 Wolfram Sang 2012-04-03 138 return -EINVAL; 0bf25a45386f28 Wolfram Sang 2012-04-03 139 0bf25a45386f28 Wolfram Sang 2012-04-03 140 active_time = pdata->active_time ?: 500; 0bf25a45386f28 Wolfram Sang 2012-04-03 141 if (active_time / 3 <= pdata->debounce_time / 3) { 0bf25a45386f28 Wolfram Sang 2012-04-03 142 dev_err(&client->dev, "Active time not big enough!\n"); 0bf25a45386f28 Wolfram Sang 2012-04-03 143 return -EINVAL; 0bf25a45386f28 Wolfram Sang 2012-04-03 144 } 0bf25a45386f28 Wolfram Sang 2012-04-03 145 0bf25a45386f28 Wolfram Sang 2012-04-03 146 lm8333 = kzalloc(sizeof(*lm8333), GFP_KERNEL); 0bf25a45386f28 Wolfram Sang 2012-04-03 @147 input = input_allocate_device(); 0bf25a45386f28 Wolfram Sang 2012-04-03 148 if (!lm8333 || !input) { 0bf25a45386f28 Wolfram Sang 2012-04-03 149 err = -ENOMEM; 0bf25a45386f28 Wolfram Sang 2012-04-03 150 goto free_mem; 0bf25a45386f28 Wolfram Sang 2012-04-03 151 } 0bf25a45386f28 Wolfram Sang 2012-04-03 152 0bf25a45386f28 Wolfram Sang 2012-04-03 153 lm8333->client = client; 0bf25a45386f28 Wolfram Sang 2012-04-03 154 lm8333->input = input; 0bf25a45386f28 Wolfram Sang 2012-04-03 155 0bf25a45386f28 Wolfram Sang 2012-04-03 156 input->name = client->name; 0bf25a45386f28 Wolfram Sang 2012-04-03 157 input->dev.parent = &client->dev; 0bf25a45386f28 Wolfram Sang 2012-04-03 158 input->id.bustype = BUS_I2C; 0bf25a45386f28 Wolfram Sang 2012-04-03 159 0bf25a45386f28 Wolfram Sang 2012-04-03 160 input_set_capability(input, EV_MSC, MSC_SCAN); 0bf25a45386f28 Wolfram Sang 2012-04-03 161 1932811f426fee Dmitry Torokhov 2012-05-10 162 err = matrix_keypad_build_keymap(pdata->matrix_data, NULL, 1932811f426fee Dmitry Torokhov 2012-05-10 163 LM8333_NUM_ROWS, LM8333_NUM_COLS, 1932811f426fee Dmitry Torokhov 2012-05-10 164 lm8333->keycodes, input); 1932811f426fee Dmitry Torokhov 2012-05-10 165 if (err) 1932811f426fee Dmitry Torokhov 2012-05-10 166 goto free_mem; 0bf25a45386f28 Wolfram Sang 2012-04-03 167 0bf25a45386f28 Wolfram Sang 2012-04-03 168 if (pdata->debounce_time) { 0bf25a45386f28 Wolfram Sang 2012-04-03 169 err = lm8333_write8(lm8333, LM8333_DEBOUNCE, 0bf25a45386f28 Wolfram Sang 2012-04-03 170 pdata->debounce_time / 3); 0bf25a45386f28 Wolfram Sang 2012-04-03 171 if (err) 0bf25a45386f28 Wolfram Sang 2012-04-03 172 dev_warn(&client->dev, "Unable to set debounce time\n"); 0bf25a45386f28 Wolfram Sang 2012-04-03 173 } 0bf25a45386f28 Wolfram Sang 2012-04-03 174 0bf25a45386f28 Wolfram Sang 2012-04-03 175 if (pdata->active_time) { 0bf25a45386f28 Wolfram Sang 2012-04-03 176 err = lm8333_write8(lm8333, LM8333_ACTIVE, 0bf25a45386f28 Wolfram Sang 2012-04-03 177 pdata->active_time / 3); 0bf25a45386f28 Wolfram Sang 2012-04-03 178 if (err) 0bf25a45386f28 Wolfram Sang 2012-04-03 179 dev_warn(&client->dev, "Unable to set active time\n"); 0bf25a45386f28 Wolfram Sang 2012-04-03 180 } 0bf25a45386f28 Wolfram Sang 2012-04-03 181 0bf25a45386f28 Wolfram Sang 2012-04-03 182 err = request_threaded_irq(client->irq, NULL, lm8333_irq_thread, 0bf25a45386f28 Wolfram Sang 2012-04-03 183 IRQF_TRIGGER_FALLING | IRQF_ONESHOT, 0bf25a45386f28 Wolfram Sang 2012-04-03 184 "lm8333", lm8333); 0bf25a45386f28 Wolfram Sang 2012-04-03 185 if (err) 0bf25a45386f28 Wolfram Sang 2012-04-03 186 goto free_mem; 0bf25a45386f28 Wolfram Sang 2012-04-03 187 0bf25a45386f28 Wolfram Sang 2012-04-03 188 err = input_register_device(input); 0bf25a45386f28 Wolfram Sang 2012-04-03 189 if (err) 0bf25a45386f28 Wolfram Sang 2012-04-03 190 goto free_irq; 0bf25a45386f28 Wolfram Sang 2012-04-03 191 0bf25a45386f28 Wolfram Sang 2012-04-03 192 i2c_set_clientdata(client, lm8333); 0bf25a45386f28 Wolfram Sang 2012-04-03 193 return 0; 0bf25a45386f28 Wolfram Sang 2012-04-03 194 0bf25a45386f28 Wolfram Sang 2012-04-03 195 free_irq: 0bf25a45386f28 Wolfram Sang 2012-04-03 196 free_irq(client->irq, lm8333); 0bf25a45386f28 Wolfram Sang 2012-04-03 197 free_mem: 0bf25a45386f28 Wolfram Sang 2012-04-03 198 input_free_device(input); 0bf25a45386f28 Wolfram Sang 2012-04-03 199 kfree(lm8333); 0bf25a45386f28 Wolfram Sang 2012-04-03 200 return err; 0bf25a45386f28 Wolfram Sang 2012-04-03 201 } 0bf25a45386f28 Wolfram Sang 2012-04-03 202 -- 0-DAY CI Kernel Test Service https://01.org/lkp