* [linux-next:master 10152/11353] drivers/irqchip/irq-meson-gpio.c:351:45: warning: variable 'params' set but not used
@ 2022-03-08 12:34 kernel test robot
2022-03-09 11:22 ` Marc Zyngier
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-03-08 12:34 UTC (permalink / raw)
To: Qianggui Song; +Cc: kbuild-all, Linux Memory Management List, Marc Zyngier
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: cb153b68ff91cbc434f3de70ac549e110543e1bb
commit: d8a61a2ec7e75723083d33800423b151106922e0 [10152/11353] irqchip/meson-gpio: Add support for meson s4 SoCs
config: h8300-buildonly-randconfig-r004-20220307 (https://download.01.org/0day-ci/archive/20220308/202203082010.Qn0EhDWH-lkp@intel.com/config)
compiler: h8300-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=d8a61a2ec7e75723083d33800423b151106922e0
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout d8a61a2ec7e75723083d33800423b151106922e0
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=h8300 SHELL=/bin/bash drivers/irqchip/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/irqchip/irq-meson-gpio.c: In function 'meson_s4_gpio_irq_set_type':
>> drivers/irqchip/irq-meson-gpio.c:351:45: warning: variable 'params' set but not used [-Wunused-but-set-variable]
351 | const struct meson_gpio_irq_params *params;
| ^~~~~~
vim +/params +351 drivers/irqchip/irq-meson-gpio.c
330
331 /*
332 * gpio irq relative registers for s4
333 * -PADCTRL_GPIO_IRQ_CTRL0
334 * bit[31]: enable/disable all the irq lines
335 * bit[12-23]: single edge trigger
336 * bit[0-11]: polarity trigger
337 *
338 * -PADCTRL_GPIO_IRQ_CTRL[X]
339 * bit[0-16]: 7 bits to choose gpio source for irq line 2*[X] - 2
340 * bit[16-22]:7 bits to choose gpio source for irq line 2*[X] - 1
341 * where X = 1-6
342 *
343 * -PADCTRL_GPIO_IRQ_CTRL[7]
344 * bit[0-11]: both edge trigger
345 */
346 static int meson_s4_gpio_irq_set_type(struct meson_gpio_irq_controller *ctl,
347 unsigned int type, u32 *channel_hwirq)
348 {
349 u32 val = 0;
350 unsigned int idx;
> 351 const struct meson_gpio_irq_params *params;
352
353 params = ctl->params;
354 idx = meson_gpio_irq_get_channel_idx(ctl, channel_hwirq);
355
356 type &= IRQ_TYPE_SENSE_MASK;
357
358 meson_gpio_irq_update_bits(ctl, REG_EDGE_POL_S4, BIT(idx), 0);
359
360 if (type == IRQ_TYPE_EDGE_BOTH) {
361 val |= BIT(ctl->params->edge_both_offset + idx);
362 meson_gpio_irq_update_bits(ctl, REG_EDGE_POL_S4,
363 BIT(ctl->params->edge_both_offset + idx), val);
364 return 0;
365 }
366
367 if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_EDGE_FALLING))
368 val |= BIT(ctl->params->pol_low_offset + idx);
369
370 if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING))
371 val |= BIT(ctl->params->edge_single_offset + idx);
372
373 meson_gpio_irq_update_bits(ctl, REG_EDGE_POL,
374 BIT(idx) | BIT(12 + idx), val);
375 return 0;
376 };
377
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-next:master 10152/11353] drivers/irqchip/irq-meson-gpio.c:351:45: warning: variable 'params' set but not used
2022-03-08 12:34 [linux-next:master 10152/11353] drivers/irqchip/irq-meson-gpio.c:351:45: warning: variable 'params' set but not used kernel test robot
@ 2022-03-09 11:22 ` Marc Zyngier
0 siblings, 0 replies; 2+ messages in thread
From: Marc Zyngier @ 2022-03-09 11:22 UTC (permalink / raw)
To: kernel test robot; +Cc: Qianggui Song, kbuild-all, Linux Memory Management List
On 2022-03-08 12:34, kernel test robot wrote:
> tree:
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> master
> head: cb153b68ff91cbc434f3de70ac549e110543e1bb
> commit: d8a61a2ec7e75723083d33800423b151106922e0 [10152/11353]
> irqchip/meson-gpio: Add support for meson s4 SoCs
> config: h8300-buildonly-randconfig-r004-20220307
> (https://download.01.org/0day-ci/archive/20220308/202203082010.Qn0EhDWH-lkp@intel.com/config)
> compiler: h8300-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=d8a61a2ec7e75723083d33800423b151106922e0
> git remote add linux-next
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout d8a61a2ec7e75723083d33800423b151106922e0
> # save the config file to linux build tree
> mkdir build_dir
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0
> make.cross O=build_dir ARCH=h8300 SHELL=/bin/bash drivers/irqchip/
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> drivers/irqchip/irq-meson-gpio.c: In function
> 'meson_s4_gpio_irq_set_type':
>>> drivers/irqchip/irq-meson-gpio.c:351:45: warning: variable 'params'
>>> set but not used [-Wunused-but-set-variable]
> 351 | const struct meson_gpio_irq_params *params;
> | ^~~~~~
>
>
> vim +/params +351 drivers/irqchip/irq-meson-gpio.c
>
> 330
> 331 /*
> 332 * gpio irq relative registers for s4
> 333 * -PADCTRL_GPIO_IRQ_CTRL0
> 334 * bit[31]: enable/disable all the irq lines
> 335 * bit[12-23]: single edge trigger
> 336 * bit[0-11]: polarity trigger
> 337 *
> 338 * -PADCTRL_GPIO_IRQ_CTRL[X]
> 339 * bit[0-16]: 7 bits to choose gpio source for irq line 2*[X] -
> 2
> 340 * bit[16-22]:7 bits to choose gpio source for irq line 2*[X] -
> 1
> 341 * where X = 1-6
> 342 *
> 343 * -PADCTRL_GPIO_IRQ_CTRL[7]
> 344 * bit[0-11]: both edge trigger
> 345 */
> 346 static int meson_s4_gpio_irq_set_type(struct
> meson_gpio_irq_controller *ctl,
> 347 unsigned int type, u32 *channel_hwirq)
> 348 {
> 349 u32 val = 0;
> 350 unsigned int idx;
> > 351 const struct meson_gpio_irq_params *params;
> 352
> 353 params = ctl->params;
Squashed the fix into the original commit (deleting these 2 lines).
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-09 11:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08 12:34 [linux-next:master 10152/11353] drivers/irqchip/irq-meson-gpio.c:351:45: warning: variable 'params' set but not used kernel test robot
2022-03-09 11:22 ` Marc Zyngier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox