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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 3 Oct 2011 11:39:44 -0500
From:	H Hartley Sweeten <hartleys@...ionengravers.com>
To:	Axel Lin <axel.lin@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:	Chris Ball <cjb@...top.org>, Olof Johansson <olof@...om.net>,
	Stephen Warren <swarren@...dia.com>,
	"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>
Subject: RE: [PATCH] mmc: sdhci-tegra: Add #ifdef CONFIG_OF guard for
 of_find_property

On Sunday, October 02, 2011 9:08 PM, Axel Lin wrote:
>
> I got below build error with "make tegra_defconfig;make"
> Add #ifdef CONFIG_OF guard for of_find_property to fix below build error:
>
>   CC      drivers/mmc/host/sdhci-tegra.o
> drivers/mmc/host/sdhci-tegra.c: In function 'sdhci_tegra_dt_parse_pdata':
> drivers/mmc/host/sdhci-tegra.c:157: error: implicit declaration of function 'of_find_property'
> make[3]: *** [drivers/mmc/host/sdhci-tegra.o] Error 1
> make[2]: *** [drivers/mmc/host] Error 2
> make[1]: *** [drivers/mmc] Error 2
> make: *** [drivers] Error 2
>
> Signed-off-by: Axel Lin <axel.lin@...il.com>
> ---
> I got the build error on linux-next (20110930).
> Axel
>
>  drivers/mmc/host/sdhci-tegra.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
> index 67176afc..3883602 100644
> --- a/drivers/mmc/host/sdhci-tegra.c
> +++ b/drivers/mmc/host/sdhci-tegra.c
> @@ -154,8 +154,11 @@ static struct tegra_sdhci_platform_data * __devinit sdhci_tegra_dt_parse_pdata(
>  	plat->cd_gpio = of_get_named_gpio(np, "cd-gpios", 0);
>  	plat->wp_gpio = of_get_named_gpio(np, "wp-gpios", 0);
>  	plat->power_gpio = of_get_named_gpio(np, "power-gpios", 0);
> +
> +#ifdef CONFIG_OF
>  	if (of_find_property(np, "support-8bit", NULL))
>  		plat->is_8bit = 1;
> +#endif

I think this type of build error is going to be very common when CONFIG_OF
is not defined.  Wouldn't it be better to fix the issue in the <linux/of.h>
header?  It looks like some of the of_* calls are already handled properly
in that header.

Regards,
Hartley

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ