> -----Original Message----- > From: linux-omap-owner@xxxxxxxxxxxxxxx [mailto:linux-omap-owner@xxxxxxxxxxxxxxx] On Behalf Of > Jarkko Nikula > Sent: Monday, March 03, 2008 4:03 PM > To: ext Tony Lindgren > Cc: ext Kyungmin Park; linux-omap@xxxxxxxxxxxxxxx > Subject: Re: [PATCH] ARM: OMAP: Remove compiler warning when i2c is not set > > On Fri, 29 Feb 2008 07:22:47 -0800 > "ext Tony Lindgren" <tony@xxxxxxxxxxx> wrote: > > > * Jarkko Nikula <jarkko.nikula@xxxxxxxxx> [080228 23:06]: > > > On Fri, 29 Feb 2008 08:12:05 +0900 > > > "ext Kyungmin Park" <kyungmin.park@xxxxxxxxxxx> wrote: > > > > > > > Remove compiler warning when i2c is not set > > > > > > > > #else > > > > -#define omap_register_i2c_bus(a, b, c, d) 0 > > > > +#define omap_register_i2c_bus(a, b, c, d) do { } while (0) > > > > #endif > > > > > > > > Hmm, are you guys sure about this? Wondering because > > omap_register_i2c_bus() returns int, no? > > > Oh, yes. Should really think the code than just doing the compile test > only... :-) > > Currently no code is using the return value so "do { } while (0)" was > working better than plain 0. Kyungmin, can you fix this something like > as: > > static inline int omap_register_i2c_bus(a, b, c, d) { return 0; } > I tried but it complains the compiler warnings. It required exact type match :) Anyway, I will post the inline style patch. BR, Kyungmin Park -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html