regulator: s5m8767: Replace of_gpio.h with what indeed is used
Subsystems (3)
PATCH 1/1 regulator: s5m8767: Replace of_gpio.h with what indeed is used
of_gpio.h in this driver is solely used as a proxy to other headers. This is incorrect usage of the of_gpio.h. Replace it .h with what indeed is used in the code.
--- drivers/regulator/s5m8767.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/regulator/s5m8767.c +2 -1
@@ -4,9 +4,10 @@// http://www.samsung.com #include <linux/err.h> -#include <linux/of_gpio.h> +#include <linux/gpio.h> #include <linux/gpio/consumer.h> #include <linux/module.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/regulator/driver.h> #include <linux/regulator/machine.h>
Signature · 1 line
2.39.2
Mark Brown
maintainerQuoted 3 lines · Andy Shevchenko
of_gpio.hin this driver is solely used as a proxy to other headers. This is incorrect usage of theof_gpio.h. Replace it .h with what indeed is used in the code.
This breaks an x86 allmodconfig build:
/build/stage/linux/drivers/regulator/s5m8767.c: In function ‘s5m8767_pmic_dt_parse_dvs_gpio’:
/build/stage/linux/drivers/regulator/s5m8767.c:492:24: error: implicit declaration of function ‘of_get_named_gpio’ [-Werror=implicit-function-declaration]
492 | gpio = of_get_named_gpio(pmic_np,
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Quoted 5 lines · Mark Brown
Quoted 3 lines · Andy Shevchenko
of_gpio.hin this driver is solely used as a proxy to other headers. This is incorrect usage of theof_gpio.h. Replace it .h with what indeed is used in the code.
Quoted 7 lines
This breaks an x86 allmodconfig build:
/build/stage/linux/drivers/regulator/s5m8767.c: In function ‘s5m8767_pmic_dt_parse_dvs_gpio’:
/build/stage/linux/drivers/regulator/s5m8767.c:492:24: error: implicit declaration of function ‘of_get_named_gpio’ [-Werror=implicit-function-declaration]
492 | gpio = of_get_named_gpio(pmic_np,| ^~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
Oh, sorry for that. I missed something. Please, ignore this one, it should be different one.
Signature · 2 lines
With Best Regards, Andy Shevchenko
kernel test robot
build botI love your patch! Yet something to improve:
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on broonie-regulator/for-next]
[also build test ERROR on linus/master v6.3-rc2 next-20230316] [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/Andy-Shevchenko/regulator-s5m8767-Replace-of_gpio-h-with-what-indeed-is-used/20230316-200231 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next patch link: https://lore.kernel.org/r/20230316120113.86421-1-andriy.shevchenko%40linux.intel.com patch subject: [PATCH v1 1/1] regulator: s5m8767: Replace of_gpio.h with what indeed is used config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230316/[email protected]/config) compiler: m68k-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/8e00ea5df88a02a09c2e6b669ebf3d1d7ead9adc
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Andy-Shevchenko/regulator-s5m8767-Replace-of_gpio-h-with-what-indeed-is-used/20230316-200231 git checkout 8e00ea5df88a02a09c2e6b669ebf3d1d7ead9adc
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
drivers/regulator/s5m8767.c: In function 's5m8767_pmic_dt_parse_dvs_gpio':
>> drivers/regulator/s5m8767.c:492:24: error: implicit declaration of function 'of_get_named_gpio' [-Werror=implicit-function-declaration]
492 | gpio = of_get_named_gpio(pmic_np,
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/of_get_named_gpio +492 drivers/regulator/s5m8767.c
ee1e0994ab1bd3 Krzysztof Kozlowski 2014-01-24 482
ee1e0994ab1bd3 Krzysztof Kozlowski 2014-01-24 483
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 484 #ifdef CONFIG_OF
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 485 static int s5m8767_pmic_dt_parse_dvs_gpio(struct sec_pmic_dev *iodev,
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 486 struct sec_platform_data *pdata,
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 487 struct device_node *pmic_np)
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 488 {
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 489 int i, gpio;
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 490
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 491 for (i = 0; i < 3; i++) {
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 @492 gpio = of_get_named_gpio(pmic_np,
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 493 "s5m8767,pmic-buck-dvs-gpios", i);
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 494 if (!gpio_is_valid(gpio)) {
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 495 dev_err(iodev->dev, "invalid gpio[%d]: %d\n", i, gpio);
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 496 return -EINVAL;
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 497 }
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 498 pdata->buck_gpios[i] = gpio;
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 499 }
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 500 return 0;
26aec009f6b61c Amit Daniel Kachhap 2013-02-03 501 }26aec009f6b61c Amit Daniel Kachhap 2013-02-03 502
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests