Re: [PATCH] platform/x86: silicom: remove unnecessary GPIO line direction check

From: kernel test robot
Date: Wed Jun 11 2025 - 01:09:13 EST


Hi Bartosz,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.16-rc1 next-20250610]
[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/Bartosz-Golaszewski/platform-x86-silicom-remove-unnecessary-GPIO-line-direction-check/20250610-225049
base: linus/master
patch link: https://lore.kernel.org/r/20250610144935.84375-1-brgl%40bgdev.pl
patch subject: [PATCH] platform/x86: silicom: remove unnecessary GPIO line direction check
config: x86_64-buildonly-randconfig-001-20250611 (https://download.01.org/0day-ci/archive/20250611/202506111214.mbG7aOVD-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250611/202506111214.mbG7aOVD-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506111214.mbG7aOVD-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

drivers/platform/x86/silicom-platform.c: In function 'silicom_gpio_set':
>> drivers/platform/x86/silicom-platform.c:251:13: warning: unused variable 'direction' [-Wunused-variable]
251 | int direction = silicom_gpio_get_direction(gc, offset);
| ^~~~~~~~~


vim +/direction +251 drivers/platform/x86/silicom-platform.c

d9cd21d441c8c7 Henry Shi 2023-11-24 247
88f67f2a99f061 Bartosz Golaszewski 2025-04-08 248 static int silicom_gpio_set(struct gpio_chip *gc, unsigned int offset,
d9cd21d441c8c7 Henry Shi 2023-11-24 249 int value)
d9cd21d441c8c7 Henry Shi 2023-11-24 250 {
d9cd21d441c8c7 Henry Shi 2023-11-24 @251 int direction = silicom_gpio_get_direction(gc, offset);
d9cd21d441c8c7 Henry Shi 2023-11-24 252 u8 *channels = gpiochip_get_data(gc);
d9cd21d441c8c7 Henry Shi 2023-11-24 253 int channel = channels[offset];
d9cd21d441c8c7 Henry Shi 2023-11-24 254
890a48ca7b0540 Dan Carpenter 2024-01-12 255 silicom_mec_port_set(channel, !value);
88f67f2a99f061 Bartosz Golaszewski 2025-04-08 256
88f67f2a99f061 Bartosz Golaszewski 2025-04-08 257 return 0;
d9cd21d441c8c7 Henry Shi 2023-11-24 258 }
d9cd21d441c8c7 Henry Shi 2023-11-24 259

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki