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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 22 Jun 2020 14:19:24 +0200
From:   Pali Rohár <pali@...nel.org>
To:     kernel test robot <lkp@...el.com>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        linux-kernel@...r.kernel.org,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Subject: Re: drivers/pci/controller/pci-aardvark.c:350:2: error: implicit
 declaration of function 'gpiod_set_value_cansleep'

On Sunday 21 June 2020 11:05:22 kernel test robot wrote:
> >> drivers/pci/controller/pci-aardvark.c:350:2: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror,-Wimplicit-function-declaration]
>            gpiod_set_value_cansleep(pcie->reset_gpio, 1);
>            ^
>    drivers/pci/controller/pci-aardvark.c:350:2: note: did you mean 'gpio_set_value_cansleep'?
>    include/linux/gpio.h:188:20: note: 'gpio_set_value_cansleep' declared here
>    static inline void gpio_set_value_cansleep(unsigned gpio, int value)
>                       ^
> >> drivers/pci/controller/pci-aardvark.c:1074:21: error: implicit declaration of function 'devm_gpiod_get_from_of_node' [-Werror,-Wimplicit-function-declaration]
>            pcie->reset_gpio = devm_gpiod_get_from_of_node(dev, dev->of_node,
>                               ^
> >> drivers/pci/controller/pci-aardvark.c:1076:14: error: use of undeclared identifier 'GPIOD_OUT_LOW'
>                                                           GPIOD_OUT_LOW,
>                                                           ^
>    20 warnings and 3 errors generated.
> 
> vim +/gpiod_set_value_cansleep +350 drivers/pci/controller/pci-aardvark.c
> 
>    335	
>    336	static void advk_pcie_issue_perst(struct advk_pcie *pcie)
>    337	{
>    338		u32 reg;
>    339	
>    340		if (!pcie->reset_gpio)
>    341			return;
>    342	
>    343		/* PERST does not work for some cards when link training is enabled */
>    344		reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG);
>    345		reg &= ~LINK_TRAINING_EN;
>    346		advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG);
>    347	
>    348		/* 10ms delay is needed for some cards */
>    349		dev_info(&pcie->pdev->dev, "issuing PERST via reset GPIO for 10ms\n");
>  > 350		gpiod_set_value_cansleep(pcie->reset_gpio, 1);
>    351		usleep_range(10000, 11000);
>    352		gpiod_set_value_cansleep(pcie->reset_gpio, 0);
>    353	}
>    354	

Hello!

Could you try to test following patch if it fixes above problems?

diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c
index 90ff291c24f0..01f1fcbb8770 100644
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -10,6 +10,7 @@
 
 #include <linux/delay.h>
 #include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/irqdomain.h>

Both GPIOD_OUT_LOW and gpiod_set_value_cansleep() are defined in
linux/gpio/consumer.h header file.

I do not have s390 box nor s390 cross compiler to do verification.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ