Search Linux Wireless

Re: [PATCH 1/8] mac80211: improve mpath debugging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2011-08-10 at 13:11 -0700, Thomas Pedersen wrote:
> On Wed, Aug 10, 2011 at 6:38 AM, Johannes Berg
> <johannes@xxxxxxxxxxxxxxxx> wrote:
> > On Tue, 2011-08-09 at 16:45 -0700, Thomas Pedersen wrote:
> >
> >> +#ifdef CONFIG_MAC80211_VERBOSE_MPATH_DEBUG
> >> +#define mpath_dbg(fmt, args...)      printk(KERN_DEBUG fmt, ##args)
> >> +#else
> >> +#define mpath_dbg(fmt, args...)      do { (void)(0); } while (0)
> >> +#endif
> >
> > Maybe this should be a static inline for checking the fmt args even when
> > it's compiled out?
> >
> I don't really see the point, since all this would give us is the
> compiler checking whether a const char * was passed as an argument to
> fmt, right?

No, if you annotate it correctly gcc will also check that the arguments
match, and warn if you do

mpath_dbg("foo: %s", 7)

for example :-)

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux