All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: kbuild-all@01.org, Mark Brown <broonie@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-kernel@vger.kernel.org,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Sangbeom Kim <sbkim73@samsung.com>,
	linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH 1/7] regulator: s5m8767: switch to using devm_fwnode_gpiod_get
Date: Sat, 5 Oct 2019 14:59:26 +0800	[thread overview]
Message-ID: <201910051436.eiQI0e5G%lkp@intel.com> (raw)
In-Reply-To: <20191004231017.130290-2-dmitry.torokhov@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 7557 bytes --]

Hi Dmitry,

I love your patch! Perhaps something to improve:

[auto build test WARNING on regulator/for-next]
[cannot apply to v5.4-rc1 next-20191004]
[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/Dmitry-Torokhov/regulator-switch-to-using-devm_-fwnode_gpiod_get_index/20191005-085020
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 8.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=nds32 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/regulator/s5m8767.c: In function 's5m8767_pmic_dt_parse_pdata':
   drivers/regulator/s5m8767.c:570:30: error: implicit declaration of function 'devm_fwnode_gpiod_get'; did you mean 'devm_gpiod_get'? [-Werror=implicit-function-declaration]
      rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
                                 ^~~~~~~~~~~~~~~~~~~~~
                                 devm_gpiod_get
>> drivers/regulator/s5m8767.c:570:28: warning: assignment to 'struct gpio_desc *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
                               ^
   cc1: some warnings being treated as errors

vim +570 drivers/regulator/s5m8767.c

   519	
   520	static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
   521						struct sec_platform_data *pdata)
   522	{
   523		struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
   524		struct device_node *pmic_np, *regulators_np, *reg_np;
   525		struct sec_regulator_data *rdata;
   526		struct sec_opmode_data *rmode;
   527		unsigned int i, dvs_voltage_nr = 8, ret;
   528	
   529		pmic_np = iodev->dev->of_node;
   530		if (!pmic_np) {
   531			dev_err(iodev->dev, "could not find pmic sub-node\n");
   532			return -ENODEV;
   533		}
   534	
   535		regulators_np = of_get_child_by_name(pmic_np, "regulators");
   536		if (!regulators_np) {
   537			dev_err(iodev->dev, "could not find regulators sub-node\n");
   538			return -EINVAL;
   539		}
   540	
   541		/* count the number of regulators to be supported in pmic */
   542		pdata->num_regulators = of_get_child_count(regulators_np);
   543	
   544		rdata = devm_kcalloc(&pdev->dev,
   545				     pdata->num_regulators, sizeof(*rdata),
   546				     GFP_KERNEL);
   547		if (!rdata)
   548			return -ENOMEM;
   549	
   550		rmode = devm_kcalloc(&pdev->dev,
   551				     pdata->num_regulators, sizeof(*rmode),
   552				     GFP_KERNEL);
   553		if (!rmode)
   554			return -ENOMEM;
   555	
   556		pdata->regulators = rdata;
   557		pdata->opmode = rmode;
   558		for_each_child_of_node(regulators_np, reg_np) {
   559			for (i = 0; i < ARRAY_SIZE(regulators); i++)
   560				if (of_node_name_eq(reg_np, regulators[i].name))
   561					break;
   562	
   563			if (i == ARRAY_SIZE(regulators)) {
   564				dev_warn(iodev->dev,
   565				"don't know how to configure regulator %pOFn\n",
   566				reg_np);
   567				continue;
   568			}
   569	
 > 570			rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
   571				&pdev->dev,
   572				of_fwnode_handle(reg_np),
   573				"s5m8767,pmic-ext-control",
   574				GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
   575				"s5m8767");
   576			if (PTR_ERR(rdata->ext_control_gpiod) == -ENOENT)
   577				rdata->ext_control_gpiod = NULL;
   578			else if (IS_ERR(rdata->ext_control_gpiod))
   579				return PTR_ERR(rdata->ext_control_gpiod);
   580	
   581			rdata->id = i;
   582			rdata->initdata = of_get_regulator_init_data(
   583							&pdev->dev, reg_np,
   584							&regulators[i]);
   585			rdata->reg_node = reg_np;
   586			rdata++;
   587			rmode->id = i;
   588			if (of_property_read_u32(reg_np, "op_mode",
   589					&rmode->mode)) {
   590				dev_warn(iodev->dev,
   591					"no op_mode property property at %pOF\n",
   592					reg_np);
   593	
   594				rmode->mode = S5M8767_OPMODE_NORMAL_MODE;
   595			}
   596			rmode++;
   597		}
   598	
   599		of_node_put(regulators_np);
   600	
   601		if (of_get_property(pmic_np, "s5m8767,pmic-buck2-uses-gpio-dvs", NULL)) {
   602			pdata->buck2_gpiodvs = true;
   603	
   604			if (of_property_read_u32_array(pmic_np,
   605					"s5m8767,pmic-buck2-dvs-voltage",
   606					pdata->buck2_voltage, dvs_voltage_nr)) {
   607				dev_err(iodev->dev, "buck2 voltages not specified\n");
   608				return -EINVAL;
   609			}
   610		}
   611	
   612		if (of_get_property(pmic_np, "s5m8767,pmic-buck3-uses-gpio-dvs", NULL)) {
   613			pdata->buck3_gpiodvs = true;
   614	
   615			if (of_property_read_u32_array(pmic_np,
   616					"s5m8767,pmic-buck3-dvs-voltage",
   617					pdata->buck3_voltage, dvs_voltage_nr)) {
   618				dev_err(iodev->dev, "buck3 voltages not specified\n");
   619				return -EINVAL;
   620			}
   621		}
   622	
   623		if (of_get_property(pmic_np, "s5m8767,pmic-buck4-uses-gpio-dvs", NULL)) {
   624			pdata->buck4_gpiodvs = true;
   625	
   626			if (of_property_read_u32_array(pmic_np,
   627					"s5m8767,pmic-buck4-dvs-voltage",
   628					pdata->buck4_voltage, dvs_voltage_nr)) {
   629				dev_err(iodev->dev, "buck4 voltages not specified\n");
   630				return -EINVAL;
   631			}
   632		}
   633	
   634		if (pdata->buck2_gpiodvs || pdata->buck3_gpiodvs ||
   635							pdata->buck4_gpiodvs) {
   636			ret = s5m8767_pmic_dt_parse_dvs_gpio(iodev, pdata, pmic_np);
   637			if (ret)
   638				return -EINVAL;
   639	
   640			if (of_property_read_u32(pmic_np,
   641					"s5m8767,pmic-buck-default-dvs-idx",
   642					&pdata->buck_default_idx)) {
   643				pdata->buck_default_idx = 0;
   644			} else {
   645				if (pdata->buck_default_idx >= 8) {
   646					pdata->buck_default_idx = 0;
   647					dev_info(iodev->dev,
   648					"invalid value for default dvs index, use 0\n");
   649				}
   650			}
   651		}
   652	
   653		ret = s5m8767_pmic_dt_parse_ds_gpio(iodev, pdata, pmic_np);
   654		if (ret)
   655			return -EINVAL;
   656	
   657		if (of_get_property(pmic_np, "s5m8767,pmic-buck2-ramp-enable", NULL))
   658			pdata->buck2_ramp_enable = true;
   659	
   660		if (of_get_property(pmic_np, "s5m8767,pmic-buck3-ramp-enable", NULL))
   661			pdata->buck3_ramp_enable = true;
   662	
   663		if (of_get_property(pmic_np, "s5m8767,pmic-buck4-ramp-enable", NULL))
   664			pdata->buck4_ramp_enable = true;
   665	
   666		if (pdata->buck2_ramp_enable || pdata->buck3_ramp_enable
   667				|| pdata->buck4_ramp_enable) {
   668			if (of_property_read_u32(pmic_np, "s5m8767,pmic-buck-ramp-delay",
   669					&pdata->buck_ramp_delay))
   670				pdata->buck_ramp_delay = 0;
   671		}
   672	
   673		return 0;
   674	}
   675	#else
   676	static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
   677						struct sec_platform_data *pdata)
   678	{
   679		return 0;
   680	}
   681	#endif /* CONFIG_OF */
   682	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 53274 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 1/7] regulator: s5m8767: switch to using devm_fwnode_gpiod_get
Date: Sat, 05 Oct 2019 14:59:26 +0800	[thread overview]
Message-ID: <201910051436.eiQI0e5G%lkp@intel.com> (raw)
In-Reply-To: <20191004231017.130290-2-dmitry.torokhov@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 7762 bytes --]

Hi Dmitry,

I love your patch! Perhaps something to improve:

[auto build test WARNING on regulator/for-next]
[cannot apply to v5.4-rc1 next-20191004]
[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/Dmitry-Torokhov/regulator-switch-to-using-devm_-fwnode_gpiod_get_index/20191005-085020
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 8.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=nds32 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/regulator/s5m8767.c: In function 's5m8767_pmic_dt_parse_pdata':
   drivers/regulator/s5m8767.c:570:30: error: implicit declaration of function 'devm_fwnode_gpiod_get'; did you mean 'devm_gpiod_get'? [-Werror=implicit-function-declaration]
      rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
                                 ^~~~~~~~~~~~~~~~~~~~~
                                 devm_gpiod_get
>> drivers/regulator/s5m8767.c:570:28: warning: assignment to 'struct gpio_desc *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
                               ^
   cc1: some warnings being treated as errors

vim +570 drivers/regulator/s5m8767.c

   519	
   520	static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
   521						struct sec_platform_data *pdata)
   522	{
   523		struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
   524		struct device_node *pmic_np, *regulators_np, *reg_np;
   525		struct sec_regulator_data *rdata;
   526		struct sec_opmode_data *rmode;
   527		unsigned int i, dvs_voltage_nr = 8, ret;
   528	
   529		pmic_np = iodev->dev->of_node;
   530		if (!pmic_np) {
   531			dev_err(iodev->dev, "could not find pmic sub-node\n");
   532			return -ENODEV;
   533		}
   534	
   535		regulators_np = of_get_child_by_name(pmic_np, "regulators");
   536		if (!regulators_np) {
   537			dev_err(iodev->dev, "could not find regulators sub-node\n");
   538			return -EINVAL;
   539		}
   540	
   541		/* count the number of regulators to be supported in pmic */
   542		pdata->num_regulators = of_get_child_count(regulators_np);
   543	
   544		rdata = devm_kcalloc(&pdev->dev,
   545				     pdata->num_regulators, sizeof(*rdata),
   546				     GFP_KERNEL);
   547		if (!rdata)
   548			return -ENOMEM;
   549	
   550		rmode = devm_kcalloc(&pdev->dev,
   551				     pdata->num_regulators, sizeof(*rmode),
   552				     GFP_KERNEL);
   553		if (!rmode)
   554			return -ENOMEM;
   555	
   556		pdata->regulators = rdata;
   557		pdata->opmode = rmode;
   558		for_each_child_of_node(regulators_np, reg_np) {
   559			for (i = 0; i < ARRAY_SIZE(regulators); i++)
   560				if (of_node_name_eq(reg_np, regulators[i].name))
   561					break;
   562	
   563			if (i == ARRAY_SIZE(regulators)) {
   564				dev_warn(iodev->dev,
   565				"don't know how to configure regulator %pOFn\n",
   566				reg_np);
   567				continue;
   568			}
   569	
 > 570			rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
   571				&pdev->dev,
   572				of_fwnode_handle(reg_np),
   573				"s5m8767,pmic-ext-control",
   574				GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
   575				"s5m8767");
   576			if (PTR_ERR(rdata->ext_control_gpiod) == -ENOENT)
   577				rdata->ext_control_gpiod = NULL;
   578			else if (IS_ERR(rdata->ext_control_gpiod))
   579				return PTR_ERR(rdata->ext_control_gpiod);
   580	
   581			rdata->id = i;
   582			rdata->initdata = of_get_regulator_init_data(
   583							&pdev->dev, reg_np,
   584							&regulators[i]);
   585			rdata->reg_node = reg_np;
   586			rdata++;
   587			rmode->id = i;
   588			if (of_property_read_u32(reg_np, "op_mode",
   589					&rmode->mode)) {
   590				dev_warn(iodev->dev,
   591					"no op_mode property property at %pOF\n",
   592					reg_np);
   593	
   594				rmode->mode = S5M8767_OPMODE_NORMAL_MODE;
   595			}
   596			rmode++;
   597		}
   598	
   599		of_node_put(regulators_np);
   600	
   601		if (of_get_property(pmic_np, "s5m8767,pmic-buck2-uses-gpio-dvs", NULL)) {
   602			pdata->buck2_gpiodvs = true;
   603	
   604			if (of_property_read_u32_array(pmic_np,
   605					"s5m8767,pmic-buck2-dvs-voltage",
   606					pdata->buck2_voltage, dvs_voltage_nr)) {
   607				dev_err(iodev->dev, "buck2 voltages not specified\n");
   608				return -EINVAL;
   609			}
   610		}
   611	
   612		if (of_get_property(pmic_np, "s5m8767,pmic-buck3-uses-gpio-dvs", NULL)) {
   613			pdata->buck3_gpiodvs = true;
   614	
   615			if (of_property_read_u32_array(pmic_np,
   616					"s5m8767,pmic-buck3-dvs-voltage",
   617					pdata->buck3_voltage, dvs_voltage_nr)) {
   618				dev_err(iodev->dev, "buck3 voltages not specified\n");
   619				return -EINVAL;
   620			}
   621		}
   622	
   623		if (of_get_property(pmic_np, "s5m8767,pmic-buck4-uses-gpio-dvs", NULL)) {
   624			pdata->buck4_gpiodvs = true;
   625	
   626			if (of_property_read_u32_array(pmic_np,
   627					"s5m8767,pmic-buck4-dvs-voltage",
   628					pdata->buck4_voltage, dvs_voltage_nr)) {
   629				dev_err(iodev->dev, "buck4 voltages not specified\n");
   630				return -EINVAL;
   631			}
   632		}
   633	
   634		if (pdata->buck2_gpiodvs || pdata->buck3_gpiodvs ||
   635							pdata->buck4_gpiodvs) {
   636			ret = s5m8767_pmic_dt_parse_dvs_gpio(iodev, pdata, pmic_np);
   637			if (ret)
   638				return -EINVAL;
   639	
   640			if (of_property_read_u32(pmic_np,
   641					"s5m8767,pmic-buck-default-dvs-idx",
   642					&pdata->buck_default_idx)) {
   643				pdata->buck_default_idx = 0;
   644			} else {
   645				if (pdata->buck_default_idx >= 8) {
   646					pdata->buck_default_idx = 0;
   647					dev_info(iodev->dev,
   648					"invalid value for default dvs index, use 0\n");
   649				}
   650			}
   651		}
   652	
   653		ret = s5m8767_pmic_dt_parse_ds_gpio(iodev, pdata, pmic_np);
   654		if (ret)
   655			return -EINVAL;
   656	
   657		if (of_get_property(pmic_np, "s5m8767,pmic-buck2-ramp-enable", NULL))
   658			pdata->buck2_ramp_enable = true;
   659	
   660		if (of_get_property(pmic_np, "s5m8767,pmic-buck3-ramp-enable", NULL))
   661			pdata->buck3_ramp_enable = true;
   662	
   663		if (of_get_property(pmic_np, "s5m8767,pmic-buck4-ramp-enable", NULL))
   664			pdata->buck4_ramp_enable = true;
   665	
   666		if (pdata->buck2_ramp_enable || pdata->buck3_ramp_enable
   667				|| pdata->buck4_ramp_enable) {
   668			if (of_property_read_u32(pmic_np, "s5m8767,pmic-buck-ramp-delay",
   669					&pdata->buck_ramp_delay))
   670				pdata->buck_ramp_delay = 0;
   671		}
   672	
   673		return 0;
   674	}
   675	#else
   676	static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
   677						struct sec_platform_data *pdata)
   678	{
   679		return 0;
   680	}
   681	#endif /* CONFIG_OF */
   682	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 53274 bytes --]

  parent reply	other threads:[~2019-10-05  7:00 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04 23:10 [PATCH 0/7] regulator: switch to using [devm_]fwnode_gpiod_get_index Dmitry Torokhov
2019-10-04 23:10 ` [PATCH 1/7] regulator: s5m8767: switch to using devm_fwnode_gpiod_get Dmitry Torokhov
2019-10-05  6:42   ` kbuild test robot
2019-10-05  6:42     ` kbuild test robot
2019-10-05  6:59   ` kbuild test robot [this message]
2019-10-05  6:59     ` kbuild test robot
2019-10-07 13:03   ` Applied "regulator: s5m8767: switch to using devm_fwnode_gpiod_get" to the regulator tree Mark Brown
2019-10-07 13:03     ` Mark Brown
2019-10-04 23:10 ` [PATCH 2/7] regulator: slg51000: switch to using fwnode_gpiod_get_index Dmitry Torokhov
2019-10-05  5:36   ` kbuild test robot
2019-10-05  5:36     ` kbuild test robot
2019-10-07 13:03   ` Applied "regulator: slg51000: switch to using fwnode_gpiod_get_index" to the regulator tree Mark Brown
2019-10-04 23:10 ` [PATCH 3/7] regulator: tps65090: switch to using devm_fwnode_gpiod_get Dmitry Torokhov
2019-10-07 13:03   ` Applied "regulator: tps65090: switch to using devm_fwnode_gpiod_get" to the regulator tree Mark Brown
2019-10-04 23:10 ` [PATCH 4/7] regulator: s2mps11: switch to using devm_fwnode_gpiod_get Dmitry Torokhov
2019-10-07 13:03   ` Applied "regulator: s2mps11: switch to using devm_fwnode_gpiod_get" to the regulator tree Mark Brown
2019-10-07 13:03     ` Mark Brown
2019-10-04 23:10 ` [PATCH 5/7] regulator: da9211: switch to using devm_fwnode_gpiod_get Dmitry Torokhov
2019-10-05  6:12   ` kbuild test robot
2019-10-05  6:12     ` kbuild test robot
2019-10-07 10:43   ` Adam Thomson
2019-10-07 13:03   ` Applied "regulator: da9211: switch to using devm_fwnode_gpiod_get" to the regulator tree Mark Brown
2019-10-04 23:10 ` [PATCH 6/7] regulator: tps65132: switch to using devm_fwnode_gpiod_get() Dmitry Torokhov
2019-10-07 13:03   ` Applied "regulator: tps65132: switch to using devm_fwnode_gpiod_get()" to the regulator tree Mark Brown
2019-10-04 23:10 ` [PATCH 7/7] regulator: max77686: switch to using fwnode_gpiod_get_index Dmitry Torokhov
2019-10-05  7:26   ` kbuild test robot
2019-10-05  7:26     ` kbuild test robot
2019-10-07 13:03   ` Applied "regulator: max77686: switch to using fwnode_gpiod_get_index" to the regulator tree Mark Brown
2019-10-05 19:01 ` [PATCH 0/7] regulator: switch to using [devm_]fwnode_gpiod_get_index Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201910051436.eiQI0e5G%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=broonie@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=kbuild-all@01.org \
    --cc=krzk@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=sbkim73@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.