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:	Sun, 2 Oct 2011 19:31:25 -0600 (MDT)
From:	Paul Walmsley <paul@...an.com>
To:	Arnd Bergmann <arnd@...db.de>
cc:	Tony Lindgren <tony@...mide.com>, linux-omap@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	"Avinash.H.M" <avinashhm@...com>
Subject: Re: [PATCH 08/30] ARM: omap2+: fix building without i2c

Hello Arnd,

On Sun, 2 Oct 2011, Arnd Bergmann wrote:

> A trivial typo causes build breakage when I2C is disabled
> and omap_i2c_reset is set to NULL on OMAP:
> 
> omap_hwmod_44xx_data.c:2287:11: error: lvalue required as unary '&' operand
> 
> Removing the '&' character solves this.
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> Cc: Avinash.H.M <avinashhm@...com>
> Cc: Paul Walmsley <paul@...an.com>

Nice catch.  I think the bug is different, though.  omap_i2c_reset should 
never be NULL: that code is intended to execute even when 
CONFIG_I2C_OMAP=n.  The idea is to prevent the IP block from interfering 
with the rest of the kernel even if the driver is not compiled in, no 
matter how the bootloader or previous OS programmed the IP block.

I'd suggest something like the following patch instead.


- Paul

From: Paul Walmsley <paul@...an.com>
Date: Sun, 2 Oct 2011 19:15:10 -0600
Subject: [PATCH] ARM: omap2+: fix build breakage when CONFIG_I2C_OMAP=n

arch/arm/mach-omap2/Makefile incorrectly skips compilation of the I2C
IP block reset code when CONFIG_I2C_OMAP=n.  Fix by unconditionally
compiling arch/arm/mach-omap2/i2c.o, which is needed on all OMAP2+ platforms.

Problem noted by Arnd Bergmann <arnd@...db.de>.

Signed-off-by: Paul Walmsley <paul@...an.com>
Cc: Avinash.H.M <avinashhm@...com>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Tony Lindgren <tony@...mide.com>
---
 arch/arm/mach-omap2/Makefile |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index f343365..0951986 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -4,7 +4,7 @@
 
 # Common support
 obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \
-	 common.o gpio.o dma.o wd_timer.o
+	 common.o gpio.o dma.o wd_timer.o i2c.o
 
 omap-2-3-common				= irq.o sdrc.o
 hwmod-common				= omap_hwmod.o \
@@ -175,9 +175,6 @@ obj-$(CONFIG_OMAP_IOMMU)		+= iommu2.o
 iommu-$(CONFIG_OMAP_IOMMU)		:= omap-iommu.o
 obj-y					+= $(iommu-m) $(iommu-y)
 
-i2c-omap-$(CONFIG_I2C_OMAP)		:= i2c.o
-obj-y					+= $(i2c-omap-m) $(i2c-omap-y)
-
 ifneq ($(CONFIG_TIDSPBRIDGE),)
 obj-y					+= dsp.o
 endif
-- 
1.7.6.3

--
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