lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 8 Jul 2019 16:15:39 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Christian Lamparter <chunkeey@...il.com>
Cc:     kbuild-all@...org, netdev@...r.kernel.org
Subject: [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'?

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@...el.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

Download attachment ".config.gz" of type "application/gzip" (31075 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ