[l1k:smsc95xx_5.17 79/888] drivers/gpio/gpio-bcm-virt.c:34:31: warning: variable 'gpio' set but not used

From: kernel test robot
Date: Sun Apr 10 2022 - 22:45:46 EST


tree: https://github.com/l1k/linux smsc95xx_5.17
head: 240f56c27361c195cd502d95aba51c6b8e5b808c
commit: caa59900dd53b8b063c04d41c7c0b1450f296b52 [79/888] bcm2835-virtgpio: Virtual GPIO driver
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20220411/202204110940.lcDSN1kZ-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-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://github.com/l1k/linux/commit/caa59900dd53b8b063c04d41c7c0b1450f296b52
git remote add l1k https://github.com/l1k/linux
git fetch --no-tags l1k smsc95xx_5.17
git checkout caa59900dd53b8b063c04d41c7c0b1450f296b52
# 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=arm SHELL=/bin/bash drivers/char/broadcom/ drivers/gpio/ drivers/perf/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

drivers/gpio/gpio-bcm-virt.c: In function 'brcmvirt_gpio_dir_in':
>> drivers/gpio/gpio-bcm-virt.c:34:31: warning: variable 'gpio' set but not used [-Wunused-but-set-variable]
34 | struct brcmvirt_gpio *gpio;
| ^~~~
drivers/gpio/gpio-bcm-virt.c: In function 'brcmvirt_gpio_dir_out':
drivers/gpio/gpio-bcm-virt.c:41:31: warning: variable 'gpio' set but not used [-Wunused-but-set-variable]
41 | struct brcmvirt_gpio *gpio;
| ^~~~


vim +/gpio +34 drivers/gpio/gpio-bcm-virt.c

31
32 static int brcmvirt_gpio_dir_in(struct gpio_chip *gc, unsigned off)
33 {
> 34 struct brcmvirt_gpio *gpio;
35 gpio = container_of(gc, struct brcmvirt_gpio, gc);
36 return -EINVAL;
37 }
38

--
0-DAY CI Kernel Test Service
https://01.org/lkp