From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: arm@kernel.org, linux-kernel@vger.kernel.org,
Arnd Bergmann <arnd@arndb.de>, Kevin Hilman <khilman@ti.com>,
Sekhar Nori <nsekhar@ti.com>, Andrey Porodko <panda@chelcom.ru>
Subject: [PATCH 06/10] ARM: davinci: don't use broken ntosd2_init_i2c
Date: Wed, 8 Aug 2012 23:27:54 +0200 [thread overview]
Message-ID: <1344461278-28245-7-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1344461278-28245-1-git-send-email-arnd@arndb.de>
ntosd2_init_i2c walks the ntosd2_i2c_info array, which it expects to
be populated with at least one member. gcc correctly warns about
the out-of-bounds access here.
Without this patch, building davinci_all_defconfig results in:
arch/arm/mach-davinci/board-neuros-osd2.c: In function 'davinci_ntosd2_init':
arch/arm/mach-davinci/board-neuros-osd2.c:187:20: warning: array subscript is above array bounds [-Warray-bounds]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Andrey Porodko <panda@chelcom.ru>
---
arch/arm/mach-davinci/board-neuros-osd2.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c
index 5de69f2..9d40df9 100644
--- a/arch/arm/mach-davinci/board-neuros-osd2.c
+++ b/arch/arm/mach-davinci/board-neuros-osd2.c
@@ -162,6 +162,7 @@ static void __init davinci_ntosd2_map_io(void)
dm644x_init();
}
+#if 0
/*
I2C initialization
*/
@@ -193,6 +194,12 @@ static int ntosd2_init_i2c(void)
}
return status;
}
+#else
+static int ntosd2_init_i2c(void)
+{
+ return 0;
+}
+#endif
static struct davinci_mmc_config davinci_ntosd2_mmc_config = {
.wires = 4,
--
1.7.10
next prev parent reply other threads:[~2012-08-08 21:28 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-08 21:27 [PATCH 00/10] ARM: interesting warnings from defconfig builds Arnd Bergmann
2012-08-08 21:27 ` [PATCH 01/10] ARM: footbridge: nw_gpio_lock is raw_spin_lock Arnd Bergmann
2012-08-08 21:27 ` [PATCH 02/10] ARM: ks8695: __arch_virt_to_dma type handling Arnd Bergmann
2012-08-08 21:27 ` [PATCH 03/10] ARM: mv78xx0: fix win_cfg_base prototype Arnd Bergmann
2012-08-13 14:59 ` Andrew Lunn
2012-08-08 21:27 ` [PATCH 04/10] ARM: pass -marm to gcc by default Arnd Bergmann
2012-08-09 21:12 ` Nicolas Pitre
2012-08-09 21:17 ` Russell King - ARM Linux
2012-08-09 21:22 ` Nicolas Pitre
2012-08-10 9:59 ` Dave Martin
2012-08-10 11:12 ` Arnd Bergmann
2012-08-08 21:27 ` [PATCH 05/10] asm-generic: xor: mark static functions as __maybe_unused Arnd Bergmann
2012-08-08 21:27 ` Arnd Bergmann [this message]
2012-08-09 8:00 ` [PATCH v2 06/10] ARM: davinci: don't use broken ntosd2_init_i2c Arnd Bergmann
2012-08-09 18:23 ` Sekhar Nori
2012-08-08 21:27 ` [PATCH 07/10] ARM: rpc: check device_register return code in ecard_probe Arnd Bergmann
2012-08-08 21:27 ` [PATCH 08/10] ARM: s3c24xx: enable CONFIG_BUG for tct_hammer Arnd Bergmann
2012-08-10 6:07 ` Kukjin Kim
2012-08-08 21:27 ` [PATCH 09/10] ARM: rpc: Fix building RiscPC Arnd Bergmann
2012-08-09 7:47 ` Russell King - ARM Linux
2012-08-10 11:03 ` Arnd Bergmann
2012-08-13 10:52 ` Russell King - ARM Linux
2012-08-08 21:27 ` [PATCH 10/10] leds: renesas: fix error handling Arnd Bergmann
2012-08-09 6:15 ` Bryan Wu
2012-08-09 7:34 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1344461278-28245-7-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=arm@kernel.org \
--cc=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=panda@chelcom.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome