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:	Tue, 10 Apr 2012 09:52:37 +0200
From:	Linus Walleij <linus.walleij@...ricsson.com>
To:	<linux-kernel@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>
Cc:	Stephen Warren <swarren@...dia.com>,
	Shawn Guo <shawn.guo@...escale.com>,
	Thomas Abraham <thomas.abraham@...aro.org>,
	Dong Aisheng <dong.aisheng@...aro.org>,
	Rajendra Nayak <rajendra.nayak@...aro.org>,
	Haojian Zhuang <haojian.zhuang@...vell.com>,
	Linus Walleij <linus.walleij@...aro.org>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Stephen Warren <swarren@...dotorg.org>
Subject: [PATCH] pinctrl: fix build failure on PPC

From: Linus Walleij <linus.walleij@...aro.org>

commit 23289e6ecc6d ("pinctrl: core device tree mapping table
parsing support") caused a build failure on PPC:

drivers/pinctrl/devicetree.c: In function 'dt_free_map':
drivers/pinctrl/devicetree.c:44:42: error: dereferencing pointer to incomplete type
drivers/pinctrl/devicetree.c:45:6: error: dereferencing pointer to incomplete type
drivers/pinctrl/devicetree.c: In function 'dt_to_map_one_config':
drivers/pinctrl/devicetree.c:140:21: error: dereferencing pointer to incomplete type
drivers/pinctrl/devicetree.c:141:10: error: dereferencing pointer to incomplete type
drivers/pinctrl/devicetree.c:146:11: error: dereferencing pointer to incomplete type

This is probably because the Makefile for pinctrl contains this,
that makes a small piece of the implementation build and link
in isolation:

obj-$(CONFIG_OF)                += devicetree.o

So let's use some local Kconfig option that depends on both OF
and PINCTRL so that this file is only compiled if you have
both enabled.

Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Stephen Warren <swarren@...dotorg.org>
Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
---
 drivers/pinctrl/Kconfig  |    5 +++++
 drivers/pinctrl/Makefile |    2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index abfb964..d68c878 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -17,6 +17,11 @@ config PINMUX
 config PINCONF
 	bool "Support pin configuration controllers"
 
+config PINCTRL_OF
+	bool
+	depends on OF
+	default y if OF
+
 config GENERIC_PINCONF
 	bool
 	select PINCONF
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
index 049c9fb..5412f60 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
@@ -5,7 +5,7 @@ ccflags-$(CONFIG_DEBUG_PINCTRL)	+= -DDEBUG
 obj-$(CONFIG_PINCTRL)		+= core.o
 obj-$(CONFIG_PINMUX)		+= pinmux.o
 obj-$(CONFIG_PINCONF)		+= pinconf.o
-obj-$(CONFIG_OF)		+= devicetree.o
+obj-$(CONFIG_PINCTRL_OF)	+= devicetree.o
 obj-$(CONFIG_GENERIC_PINCONF)	+= pinconf-generic.o
 obj-$(CONFIG_PINCTRL_PXA3xx)	+= pinctrl-pxa3xx.o
 obj-$(CONFIG_PINCTRL_MMP2)	+= pinctrl-mmp2.o
-- 
1.7.9.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ