All of lore.kernel.org
 help / color / mirror / Atom feed
* [freescale-fslc:6.6-1.0.x-imx 3505/11728] drivers/pinctrl/devicetree.c:201:6: warning: variable 'index' set but not used
@ 2024-04-28  1:45 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-28  1:45 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: oe-kbuild-all

tree:   https://github.com/Freescale/linux-fslc 6.6-1.0.x-imx
head:   37770f55ac9c4f6cd958eb5544939207eed8478f
commit: 26bccb9f27ca09e8c00172691a23151779342d8a [3505/11728] MLK-11749: pinctrl: support pinctrl setting assertion via gpios
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20240428/202404280905.RCuGmtS8-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 5ef5eb66fb428aaf61fb51b709f065c069c11242)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240428/202404280905.RCuGmtS8-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404280905.RCuGmtS8-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/pinctrl/devicetree.c:201:6: warning: variable 'index' set but not used [-Wunused-but-set-variable]
     201 |         int index = 0;
         |             ^
   1 warning generated.


vim +/index +201 drivers/pinctrl/devicetree.c

   196	
   197	static int dt_gpio_assert_pinctrl(struct pinctrl *p)
   198	{
   199		struct device_node *np = p->dev->of_node;
   200		struct gpio_desc *gpio;
 > 201		int index = 0;
   202		int ret;
   203	
   204		if (!of_find_property(np, "pinctrl-assert-gpios", NULL))
   205			return 0; /* Missing the property, so nothing to be done */
   206	
   207		for (;; index++) {
   208			gpio = devm_gpiod_get_optional(p->dev, "pinctrl-assert",
   209						       GPIOD_OUT_HIGH);
   210			ret = PTR_ERR(gpio);
   211			if (ret < 0) {
   212				if (PTR_ERR(gpio) == -EPROBE_DEFER)
   213					return -EPROBE_DEFER;
   214	 			break; /* End of the phandle list */
   215	 		}
   216		}
   217	
   218		return 0;
   219	}
   220	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-28  1:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-28  1:45 [freescale-fslc:6.6-1.0.x-imx 3505/11728] drivers/pinctrl/devicetree.c:201:6: warning: variable 'index' set but not used kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.