* [PATCH] i2c: Fix warnings from I2C_BOARD_INFO()
@ 2009-04-14 13:47 Ben Dooks
2009-04-14 14:11 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Ben Dooks @ 2009-04-14 13:47 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-fsdevel, viro, Ben Dooks
The first argument for this macro is a string, and
thus having (arg) in the macro is causing gcc 4.2.4
to produce warnings about strings of the form ("str").
Remove the brackets from the first argument.
example warning:
mach-bast.c:545:3: warning: array initialized from parenthesized string constant
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
include/linux/i2c.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 00ee11e..ad25805 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -274,7 +274,7 @@ struct i2c_board_info {
* are provided using conventional syntax.
*/
#define I2C_BOARD_INFO(dev_type, dev_addr) \
- .type = (dev_type), .addr = (dev_addr)
+ .type = dev_type, .addr = (dev_addr)
/* Add-on boards should register/unregister their devices; e.g. a board
--
1.5.6.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: Fix warnings from I2C_BOARD_INFO()
2009-04-14 13:47 [PATCH] i2c: Fix warnings from I2C_BOARD_INFO() Ben Dooks
@ 2009-04-14 14:11 ` Mark Brown
2009-04-14 14:13 ` Ben Dooks
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2009-04-14 14:11 UTC (permalink / raw)
To: Ben Dooks; +Cc: linux-kernel, linux-fsdevel, viro
On Tue, Apr 14, 2009 at 02:47:02PM +0100, Ben Dooks wrote:
> The first argument for this macro is a string, and
> thus having (arg) in the macro is causing gcc 4.2.4
> to produce warnings about strings of the form ("str").
Ben Hutchings submitted a patch for this recently which Jean merged.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: Fix warnings from I2C_BOARD_INFO()
2009-04-14 14:11 ` Mark Brown
@ 2009-04-14 14:13 ` Ben Dooks
0 siblings, 0 replies; 3+ messages in thread
From: Ben Dooks @ 2009-04-14 14:13 UTC (permalink / raw)
To: Mark Brown; +Cc: Ben Dooks, linux-kernel, linux-fsdevel, viro
On Tue, Apr 14, 2009 at 03:11:38PM +0100, Mark Brown wrote:
> On Tue, Apr 14, 2009 at 02:47:02PM +0100, Ben Dooks wrote:
> > The first argument for this macro is a string, and
> > thus having (arg) in the macro is causing gcc 4.2.4
> > to produce warnings about strings of the form ("str").
>
> Ben Hutchings submitted a patch for this recently which Jean merged.
Yes, I didn't mean to submit this one, messed up git-format-patch for
the fs/super.c patch I wanted to send.
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-14 14:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-14 13:47 [PATCH] i2c: Fix warnings from I2C_BOARD_INFO() Ben Dooks
2009-04-14 14:11 ` Mark Brown
2009-04-14 14:13 ` Ben Dooks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).