[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202101062355.n4fgUrj2-lkp@intel.com>
Date: Wed, 6 Jan 2021 23:33:41 +0800
From: kernel test robot <lkp@...el.com>
To: Tony Lindgren <tony@...mide.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: kbuild-all@...ts.01.org, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
Arthur Demchenkov <spinal.by@...il.com>,
Carl Philipp Klemm <philipp@...s.xyz>,
Merlijn Wajer <merlijn@...zup.org>,
Pavel Machek <pavel@....cz>, ruleh <ruleh@....de>,
Sebastian Reichel <sre@...nel.org>
Subject: Re: [PATCH 3/4] Input: omap4-keypad - use PM runtime to check keys
for errata
Hi Tony,
I love your patch! Perhaps something to improve:
[auto build test WARNING on input/next]
[also build test WARNING on linus/master v5.11-rc2 next-20210104]
[cannot apply to hid/for-next linux/master]
[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]
url: https://github.com/0day-ci/linux/commits/Tony-Lindgren/Lost-key-up-interrupt-handling-for-omap4-keypad/20210106-210045
base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
config: openrisc-randconfig-s031-20210106 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-dirty
# https://github.com/0day-ci/linux/commit/69f44d8d3d1568dd3f330a46f6173a1bfc372ebd
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tony-Lindgren/Lost-key-up-interrupt-handling-for-omap4-keypad/20210106-210045
git checkout 69f44d8d3d1568dd3f330a46f6173a1bfc372ebd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=openrisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/input/keyboard/omap4-keypad.c: In function 'omap4_keypad_scan_keys':
drivers/input/keyboard/omap4-keypad.c:162:6: warning: variable 'keys_up' set but not used [-Wunused-but-set-variable]
162 | int keys_up, keys_down;
| ^~~~~~~
drivers/input/keyboard/omap4-keypad.c: In function 'omap4_keypad_irq_thread_fn':
>> drivers/input/keyboard/omap4-keypad.c:192:7: warning: variable 'down_events' set but not used [-Wunused-but-set-variable]
192 | bool down_events;
| ^~~~~~~~~~~
At top level:
drivers/input/keyboard/omap4-keypad.c:536:32: warning: 'omap4_keypad_pm_ops' defined but not used [-Wunused-const-variable=]
536 | static const struct dev_pm_ops omap4_keypad_pm_ops = {
| ^~~~~~~~~~~~~~~~~~~
vim +/down_events +192 drivers/input/keyboard/omap4-keypad.c
158
159 static bool omap4_keypad_scan_keys(struct omap4_keypad *keypad_data, bool clear)
160 {
161 struct input_dev *input_dev = keypad_data->input;
> 162 int keys_up, keys_down;
163 u32 low, high;
164 u64 keys = 0;
165
166 mutex_lock(&keypad_data->lock);
167 if (!clear) {
168 low = kbd_readl(keypad_data, OMAP4_KBD_FULLCODE31_0);
169 high = kbd_readl(keypad_data, OMAP4_KBD_FULLCODE63_32);
170 keys = low | (u64)high << 32;
171 }
172
173 /* Scan for key up events for lost key-up interrupts */
174 keys_up = omap4_keypad_scan_state(keypad_data, keys, false);
175
176 /* Scan for key down events */
177 keys_down = omap4_keypad_scan_state(keypad_data, keys, true);
178
179 input_sync(input_dev);
180
181 keypad_data->keys = keys;
182
183 mutex_unlock(&keypad_data->lock);
184
185 return keys_down;
186 }
187
188 static irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id)
189 {
190 struct omap4_keypad *keypad_data = dev_id;
191 struct device *dev = keypad_data->input->dev.parent;
> 192 bool down_events;
193 int error;
194
195 error = pm_runtime_get_sync(dev);
196 if (error < 0) {
197 pm_runtime_put_noidle(dev);
198
199 return IRQ_NONE;
200 }
201
202 down_events = omap4_keypad_scan_keys(keypad_data, false);
203
204 /* clear pending interrupts */
205 kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
206 kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
207
208 pm_runtime_mark_last_busy(dev);
209 pm_runtime_put_autosuspend(dev);
210
211 return IRQ_HANDLED;
212 }
213
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (22214 bytes)
Powered by blists - more mailing lists