Search Linux Wireless

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

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

 



On Thu, 2011-08-11 at 19:53 -0700, Thomas Pedersen wrote:

> +#ifdef CONFIG_MAC80211_VERBOSE_MPATH_DEBUG
> +static inline void mpath_dbg(const char *fmt, ...)
> +{
> +	struct va_format vaf;
> +	va_list args;
> +
> +	va_start(args, fmt);
> +
> +	vaf.fmt = fmt;
> +	vaf.va = &args;
> +
> +	printk(KERN_DEBUG "%pV", &vaf);
> +	va_end(args);
> +	return;
> +}
> +#else
> +static inline void mpath_dbg(const char *fmt, ...)
> +{
> +	return;
> +}
> +#endif

Oh, maybe that's too complicated after all... How about

#ifdef ...
#define ...
#else
static inline void mpath_dbg(const char *fmt, ...)
	__attribute__ ((format (printf, 1, 2)))
{
}
#endif

Definitely want the format attribute, that was my whole point :)

Bah, maybe it all doesn't matter, in which case maybe the first version
is better.

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