netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next:master 342/422] drivers/net/dsa/qca8k.c:1050:21: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_gpio_request_one'?
@ 2019-07-08  8:15 kbuild test robot
  2019-07-09 18:17 ` Christian Lamparter
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2019-07-08  8:15 UTC (permalink / raw)
  To: Christian Lamparter; +Cc: kbuild-all, netdev

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

tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/davem/net-next.git master
head:   61a582be1a668a0c1407a46f779965bfeff88784
commit: a653f2f538f9d3e2d1f1445f74a47bfdace85c2e [342/422] net: dsa: qca8k: introduce reset via gpio feature
config: x86_64-randconfig-s2-07081539 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-9) 7.4.0
reproduce:
        git checkout a653f2f538f9d3e2d1f1445f74a47bfdace85c2e
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

All errors (new ones prefixed by >>):

   drivers/net/dsa/qca8k.c: In function 'qca8k_sw_probe':
>> drivers/net/dsa/qca8k.c:1050:21: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_gpio_request_one'? [-Werror=implicit-function-declaration]
     priv->reset_gpio = devm_gpiod_get_optional(priv->dev, "reset",
                        ^~~~~~~~~~~~~~~~~~~~~~~
                        devm_gpio_request_one
>> drivers/net/dsa/qca8k.c:1051:10: error: 'GPIOD_ASIS' undeclared (first use in this function); did you mean 'GPIOF_IN'?
             GPIOD_ASIS);
             ^~~~~~~~~~
             GPIOF_IN
   drivers/net/dsa/qca8k.c:1051:10: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/net/dsa/qca8k.c:1056:3: error: implicit declaration of function 'gpiod_set_value_cansleep'; did you mean 'gpio_set_value_cansleep'? [-Werror=implicit-function-declaration]
      gpiod_set_value_cansleep(priv->reset_gpio, 1);
      ^~~~~~~~~~~~~~~~~~~~~~~~
      gpio_set_value_cansleep
   cc1: some warnings being treated as errors

vim +1050 drivers/net/dsa/qca8k.c

  1033	
  1034	static int
  1035	qca8k_sw_probe(struct mdio_device *mdiodev)
  1036	{
  1037		struct qca8k_priv *priv;
  1038		u32 id;
  1039	
  1040		/* allocate the private data struct so that we can probe the switches
  1041		 * ID register
  1042		 */
  1043		priv = devm_kzalloc(&mdiodev->dev, sizeof(*priv), GFP_KERNEL);
  1044		if (!priv)
  1045			return -ENOMEM;
  1046	
  1047		priv->bus = mdiodev->bus;
  1048		priv->dev = &mdiodev->dev;
  1049	
> 1050		priv->reset_gpio = devm_gpiod_get_optional(priv->dev, "reset",
> 1051							   GPIOD_ASIS);
  1052		if (IS_ERR(priv->reset_gpio))
  1053			return PTR_ERR(priv->reset_gpio);
  1054	
  1055		if (priv->reset_gpio) {
> 1056			gpiod_set_value_cansleep(priv->reset_gpio, 1);
  1057			/* The active low duration must be greater than 10 ms
  1058			 * and checkpatch.pl wants 20 ms.
  1059			 */
  1060			msleep(20);
  1061			gpiod_set_value_cansleep(priv->reset_gpio, 0);
  1062		}
  1063	
  1064		/* read the switches ID register */
  1065		id = qca8k_read(priv, QCA8K_REG_MASK_CTRL);
  1066		id >>= QCA8K_MASK_CTRL_ID_S;
  1067		id &= QCA8K_MASK_CTRL_ID_M;
  1068		if (id != QCA8K_ID_QCA8337)
  1069			return -ENODEV;
  1070	
  1071		priv->ds = dsa_switch_alloc(&mdiodev->dev, DSA_MAX_PORTS);
  1072		if (!priv->ds)
  1073			return -ENOMEM;
  1074	
  1075		priv->ds->priv = priv;
  1076		priv->ops = qca8k_switch_ops;
  1077		priv->ds->ops = &priv->ops;
  1078		mutex_init(&priv->reg_mutex);
  1079		dev_set_drvdata(&mdiodev->dev, priv);
  1080	
  1081		return dsa_register_switch(priv->ds);
  1082	}
  1083	

---
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: 31075 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [net-next:master 342/422] drivers/net/dsa/qca8k.c:1050:21: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_gpio_request_one'?
  2019-07-08  8:15 [net-next:master 342/422] drivers/net/dsa/qca8k.c:1050:21: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_gpio_request_one'? kbuild test robot
@ 2019-07-09 18:17 ` Christian Lamparter
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Lamparter @ 2019-07-09 18:17 UTC (permalink / raw)
  To: kbuild test robot; +Cc: kbuild-all, Netdev

(let's hope that the gmail web interface doesn't mangle this too much)

On Mon, Jul 8, 2019 at 10:16 AM kbuild test robot <lkp@intel.com> wrote:
>
> tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/davem/net-next.git master
> head:   61a582be1a668a0c1407a46f779965bfeff88784
> commit: a653f2f538f9d3e2d1f1445f74a47bfdace85c2e [342/422] net: dsa: qca8k: introduce reset via gpio feature
> config: x86_64-randconfig-s2-07081539 (attached as .config)
> compiler: gcc-7 (Debian 7.4.0-9) 7.4.0
> reproduce:
>         git checkout a653f2f538f9d3e2d1f1445f74a47bfdace85c2e
>         # save the attached .config to linux build tree
>         make ARCH=x86_64
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
>    drivers/net/dsa/qca8k.c: In function 'qca8k_sw_probe':
> >> drivers/net/dsa/qca8k.c:1050:21: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_gpio_request_one'? [-Werror=implicit-function-declaration]
>      priv->reset_gpio = devm_gpiod_get_optional(priv->dev, "reset",
>                         ^~~~~~~~~~~~~~~~~~~~~~~
>                         devm_gpio_request_one
> >> drivers/net/dsa/qca8k.c:1051:10: error: 'GPIOD_ASIS' undeclared (first use in this function); did you mean 'GPIOF_IN'?
>              GPIOD_ASIS);
>              ^~~~~~~~~~
>              GPIOF_IN
>    drivers/net/dsa/qca8k.c:1051:10: note: each undeclared identifier is reported only once for each function it appears in
> >> drivers/net/dsa/qca8k.c:1056:3: error: implicit declaration of function 'gpiod_set_value_cansleep'; did you mean 'gpio_set_value_cansleep'? [-Werror=implicit-function-declaration]
>       gpiod_set_value_cansleep(priv->reset_gpio, 1);
>       ^~~~~~~~~~~~~~~~~~~~~~~~
>       gpio_set_value_cansleep
>    cc1: some warnings being treated as errors
>
> vim +1050 drivers/net/dsa/qca8k.c

Ok, I think that just the

#include <linux/gpio/consumer.h>

is needed. I can make a patch for this no issue. I'll download
net-next over the next days
(currently I'm just on a 3G/EDGE connection, so the 1.53 GiB will have
to wait until the
weekend.)

Regards,
Christian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-09 18:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-08  8:15 [net-next:master 342/422] drivers/net/dsa/qca8k.c:1050:21: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_gpio_request_one'? kbuild test robot
2019-07-09 18:17 ` Christian Lamparter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).