pinctrl: stm32: Unshadow np variable in stm32_pctl_probe()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sat, 7 May 2022 10:22:57 +0000 (13:22 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 13 May 2022 23:13:42 +0000 (01:13 +0200)
commit8b3dd882bfd2cf00da986bb0cf5c607e23c0f110
tree19508005fa9b22e2b8fc77eb66c772ffb9ab67e0
parent7755d26c0425cd68439686a9cdb65afe9476970c
pinctrl: stm32: Unshadow np variable in stm32_pctl_probe()

The np variable is used globally for stm32_pctl_probe() and in one of
its code branches. cppcheck is not happy with that:

  pinctrl-stm32.c:1530:23: warning: Local variable 'np' shadows outer variable [shadowVariable]

Instead of simply renaming one of the variables convert some code to
use a device pointer directly.

Fixes: bb949ed9b16b ("pinctrl: stm32: Switch to use for_each_gpiochip_node() helper")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Fabien Dessenne <fabien.dessenne@foss.st.com>
Link: https://lore.kernel.org/r/20220507102257.26414-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/stm32/pinctrl-stm32.c