Message ID | 20200615151353.88194-3-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers | show |
Series | pinctrl: intel: Reuse for_each_requested_gpio*() macros | expand |
Hi Andy, I love your patch! Yet something to improve: [auto build test ERROR on pinctrl/devel] [also build test ERROR on v5.8-rc1 next-20200615] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/pinctrl-intel-Reuse-for_each_requested_gpio-macros/20200615-231832 base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel config: x86_64-allyesconfig (attached as .config) compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44) 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 # install x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>, old ones prefixed by <<): >> drivers/pinctrl/intel/pinctrl-lynxpoint.c:928:2: error: implicit declaration of function 'for_each_requested_gpio' [-Werror,-Wimplicit-function-declaration] for_each_requested_gpio(chip, i, dummy) { ^ >> drivers/pinctrl/intel/pinctrl-lynxpoint.c:928:41: error: expected ';' after expression for_each_requested_gpio(chip, i, dummy) { ^ ; 2 errors generated. vim +/for_each_requested_gpio +928 drivers/pinctrl/intel/pinctrl-lynxpoint.c 918 919 static int lp_gpio_resume(struct device *dev) 920 { 921 struct intel_pinctrl *lg = dev_get_drvdata(dev); 922 struct gpio_chip *chip = &lg->chip; 923 const char *dummy; 924 void __iomem *reg; 925 int i; 926 927 /* on some hardware suspend clears input sensing, re-enable it here */ > 928 for_each_requested_gpio(chip, i, dummy) { 929 reg = lp_gpio_reg(chip, i, LP_CONFIG2); 930 iowrite32(ioread32(reg) & ~GPINDIS_BIT, reg); 931 } 932 933 return 0; 934 } 935 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff --git a/drivers/pinctrl/intel/pinctrl-lynxpoint.c b/drivers/pinctrl/intel/pinctrl-lynxpoint.c index a45b8f2182fd..2a3af998b91c 100644 --- a/drivers/pinctrl/intel/pinctrl-lynxpoint.c +++ b/drivers/pinctrl/intel/pinctrl-lynxpoint.c @@ -919,16 +919,17 @@ static int lp_gpio_runtime_resume(struct device *dev) static int lp_gpio_resume(struct device *dev) { struct intel_pinctrl *lg = dev_get_drvdata(dev); + struct gpio_chip *chip = &lg->chip; + const char *dummy; void __iomem *reg; int i; /* on some hardware suspend clears input sensing, re-enable it here */ - for (i = 0; i < lg->chip.ngpio; i++) { - if (gpiochip_is_requested(&lg->chip, i) != NULL) { - reg = lp_gpio_reg(&lg->chip, i, LP_CONFIG2); - iowrite32(ioread32(reg) & ~GPINDIS_BIT, reg); - } + for_each_requested_gpio(chip, i, dummy) { + reg = lp_gpio_reg(chip, i, LP_CONFIG2); + iowrite32(ioread32(reg) & ~GPINDIS_BIT, reg); } + return 0; }
Make use of for_each_requested_gpio() instead of home grown analogue. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/pinctrl/intel/pinctrl-lynxpoint.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)