[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202209240542.oz2qJs03-lkp@intel.com>
Date: Sat, 24 Sep 2022 06:42:25 +0800
From: kernel test robot <lkp@...el.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: kbuild-all@...ts.01.org,
Dmitry Torokhov <dmitry.torokhov@...il.com>
Subject: Re: [PATCH v1 2/2] Input: matrix_keypad - replace header inclusions
by forward declarations
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on dtor-input/next]
[also build test ERROR 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: s390-allmodconfig
compiler: s390-linux-gcc (GCC) 12.1.0
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=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash drivers/input/keyboard/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All error/warnings (new ones prefixed by >>):
drivers/input/keyboard/lm8333.c: In function 'lm8333_key_handler':
>> drivers/input/keyboard/lm8333.c:95:17: error: implicit declaration of function 'input_event' [-Werror=implicit-function-declaration]
95 | input_event(input, EV_MSC, MSC_SCAN, code);
| ^~~~~~~~~~~
>> drivers/input/keyboard/lm8333.c:95:36: error: 'EV_MSC' undeclared (first use in this function)
95 | input_event(input, EV_MSC, MSC_SCAN, code);
| ^~~~~~
drivers/input/keyboard/lm8333.c:95:36: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/input/keyboard/lm8333.c:95:44: error: 'MSC_SCAN' undeclared (first use in this function)
95 | input_event(input, EV_MSC, MSC_SCAN, code);
| ^~~~~~~~
>> drivers/input/keyboard/lm8333.c:96:17: error: implicit declaration of function 'input_report_key' [-Werror=implicit-function-declaration]
96 | input_report_key(input, lm8333->keycodes[code], pressed);
| ^~~~~~~~~~~~~~~~
>> drivers/input/keyboard/lm8333.c:99:9: error: implicit declaration of function 'input_sync'; did you mean 'mmput_async'? [-Werror=implicit-function-declaration]
99 | input_sync(input);
| ^~~~~~~~~~
| mmput_async
drivers/input/keyboard/lm8333.c: In function 'lm8333_probe':
>> drivers/input/keyboard/lm8333.c:147:17: error: implicit declaration of function 'input_allocate_device' [-Werror=implicit-function-declaration]
147 | input = input_allocate_device();
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/input/keyboard/lm8333.c:147:15: warning: assignment to 'struct input_dev *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
147 | input = input_allocate_device();
| ^
>> drivers/input/keyboard/lm8333.c:156:14: error: invalid use of undefined type 'struct input_dev'
156 | input->name = client->name;
| ^~
drivers/input/keyboard/lm8333.c:157:14: error: invalid use of undefined type 'struct input_dev'
157 | input->dev.parent = &client->dev;
| ^~
drivers/input/keyboard/lm8333.c:158:14: error: invalid use of undefined type 'struct input_dev'
158 | input->id.bustype = BUS_I2C;
| ^~
>> drivers/input/keyboard/lm8333.c:158:29: error: 'BUS_I2C' undeclared (first use in this function)
158 | input->id.bustype = BUS_I2C;
| ^~~~~~~
>> drivers/input/keyboard/lm8333.c:160:9: error: implicit declaration of function 'input_set_capability' [-Werror=implicit-function-declaration]
160 | input_set_capability(input, EV_MSC, MSC_SCAN);
| ^~~~~~~~~~~~~~~~~~~~
drivers/input/keyboard/lm8333.c:160:37: error: 'EV_MSC' undeclared (first use in this function)
160 | input_set_capability(input, EV_MSC, MSC_SCAN);
| ^~~~~~
drivers/input/keyboard/lm8333.c:160:45: error: 'MSC_SCAN' undeclared (first use in this function)
160 | input_set_capability(input, EV_MSC, MSC_SCAN);
| ^~~~~~~~
>> drivers/input/keyboard/lm8333.c:188:15: error: implicit declaration of function 'input_register_device'; did you mean 'i2c_unregister_device'? [-Werror=implicit-function-declaration]
188 | err = input_register_device(input);
| ^~~~~~~~~~~~~~~~~~~~~
| i2c_unregister_device
>> drivers/input/keyboard/lm8333.c:198:9: error: implicit declaration of function 'input_free_device'; did you mean 'put_swap_device'? [-Werror=implicit-function-declaration]
198 | input_free_device(input);
| ^~~~~~~~~~~~~~~~~
| put_swap_device
drivers/input/keyboard/lm8333.c: In function 'lm8333_remove':
>> drivers/input/keyboard/lm8333.c:208:9: error: implicit declaration of function 'input_unregister_device'; did you mean 'i2c_unregister_device'? [-Werror=implicit-function-declaration]
208 | input_unregister_device(lm8333->input);
| ^~~~~~~~~~~~~~~~~~~~~~~
| i2c_unregister_device
cc1: some warnings being treated as errors
vim +156 drivers/input/keyboard/lm8333.c
0bf25a45386f28 Wolfram Sang 2012-04-03 75
0bf25a45386f28 Wolfram Sang 2012-04-03 76 static void lm8333_key_handler(struct lm8333 *lm8333)
0bf25a45386f28 Wolfram Sang 2012-04-03 77 {
0bf25a45386f28 Wolfram Sang 2012-04-03 78 struct input_dev *input = lm8333->input;
0bf25a45386f28 Wolfram Sang 2012-04-03 79 u8 keys[LM8333_FIFO_TRANSFER_SIZE];
0bf25a45386f28 Wolfram Sang 2012-04-03 80 u8 code, pressed;
0bf25a45386f28 Wolfram Sang 2012-04-03 81 int i, ret;
0bf25a45386f28 Wolfram Sang 2012-04-03 82
0bf25a45386f28 Wolfram Sang 2012-04-03 83 ret = lm8333_read_block(lm8333, LM8333_FIFO_READ,
0bf25a45386f28 Wolfram Sang 2012-04-03 84 LM8333_FIFO_TRANSFER_SIZE, keys);
0bf25a45386f28 Wolfram Sang 2012-04-03 85 if (ret != LM8333_FIFO_TRANSFER_SIZE) {
0bf25a45386f28 Wolfram Sang 2012-04-03 86 dev_err(&lm8333->client->dev,
0bf25a45386f28 Wolfram Sang 2012-04-03 87 "Error %d while reading FIFO\n", ret);
0bf25a45386f28 Wolfram Sang 2012-04-03 88 return;
0bf25a45386f28 Wolfram Sang 2012-04-03 89 }
0bf25a45386f28 Wolfram Sang 2012-04-03 90
954bd6d1c9f6a5 Alan Cox 2012-06-27 91 for (i = 0; i < LM8333_FIFO_TRANSFER_SIZE && keys[i]; i++) {
0bf25a45386f28 Wolfram Sang 2012-04-03 92 pressed = keys[i] & 0x80;
0bf25a45386f28 Wolfram Sang 2012-04-03 93 code = keys[i] & 0x7f;
0bf25a45386f28 Wolfram Sang 2012-04-03 94
0bf25a45386f28 Wolfram Sang 2012-04-03 @95 input_event(input, EV_MSC, MSC_SCAN, code);
0bf25a45386f28 Wolfram Sang 2012-04-03 @96 input_report_key(input, lm8333->keycodes[code], pressed);
0bf25a45386f28 Wolfram Sang 2012-04-03 97 }
0bf25a45386f28 Wolfram Sang 2012-04-03 98
0bf25a45386f28 Wolfram Sang 2012-04-03 @99 input_sync(input);
0bf25a45386f28 Wolfram Sang 2012-04-03 100 }
0bf25a45386f28 Wolfram Sang 2012-04-03 101
0bf25a45386f28 Wolfram Sang 2012-04-03 102 static irqreturn_t lm8333_irq_thread(int irq, void *data)
0bf25a45386f28 Wolfram Sang 2012-04-03 103 {
0bf25a45386f28 Wolfram Sang 2012-04-03 104 struct lm8333 *lm8333 = data;
0bf25a45386f28 Wolfram Sang 2012-04-03 105 u8 status = lm8333_read8(lm8333, LM8333_READ_INT);
0bf25a45386f28 Wolfram Sang 2012-04-03 106
0bf25a45386f28 Wolfram Sang 2012-04-03 107 if (!status)
0bf25a45386f28 Wolfram Sang 2012-04-03 108 return IRQ_NONE;
0bf25a45386f28 Wolfram Sang 2012-04-03 109
0bf25a45386f28 Wolfram Sang 2012-04-03 110 if (status & LM8333_ERROR_IRQ) {
0bf25a45386f28 Wolfram Sang 2012-04-03 111 u8 err = lm8333_read8(lm8333, LM8333_READ_ERROR);
0bf25a45386f28 Wolfram Sang 2012-04-03 112
0bf25a45386f28 Wolfram Sang 2012-04-03 113 if (err & (LM8333_ERROR_KEYOVR | LM8333_ERROR_FIFOOVR)) {
0bf25a45386f28 Wolfram Sang 2012-04-03 114 u8 dummy[LM8333_FIFO_TRANSFER_SIZE];
0bf25a45386f28 Wolfram Sang 2012-04-03 115
0bf25a45386f28 Wolfram Sang 2012-04-03 116 lm8333_read_block(lm8333, LM8333_FIFO_READ,
0bf25a45386f28 Wolfram Sang 2012-04-03 117 LM8333_FIFO_TRANSFER_SIZE, dummy);
0bf25a45386f28 Wolfram Sang 2012-04-03 118 }
0bf25a45386f28 Wolfram Sang 2012-04-03 119 dev_err(&lm8333->client->dev, "Got error %02x\n", err);
0bf25a45386f28 Wolfram Sang 2012-04-03 120 }
0bf25a45386f28 Wolfram Sang 2012-04-03 121
0bf25a45386f28 Wolfram Sang 2012-04-03 122 if (status & LM8333_KEYPAD_IRQ)
0bf25a45386f28 Wolfram Sang 2012-04-03 123 lm8333_key_handler(lm8333);
0bf25a45386f28 Wolfram Sang 2012-04-03 124
0bf25a45386f28 Wolfram Sang 2012-04-03 125 return IRQ_HANDLED;
0bf25a45386f28 Wolfram Sang 2012-04-03 126 }
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
ed5c2f5fd10dda Uwe Kleine-König 2022-08-15 203 static void lm8333_remove(struct i2c_client *client)
0bf25a45386f28 Wolfram Sang 2012-04-03 204 {
0bf25a45386f28 Wolfram Sang 2012-04-03 205 struct lm8333 *lm8333 = i2c_get_clientdata(client);
0bf25a45386f28 Wolfram Sang 2012-04-03 206
0bf25a45386f28 Wolfram Sang 2012-04-03 207 free_irq(client->irq, lm8333);
0bf25a45386f28 Wolfram Sang 2012-04-03 @208 input_unregister_device(lm8333->input);
0bf25a45386f28 Wolfram Sang 2012-04-03 209 kfree(lm8333);
0bf25a45386f28 Wolfram Sang 2012-04-03 210 }
0bf25a45386f28 Wolfram Sang 2012-04-03 211
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (119727 bytes)
Powered by blists - more mailing lists