Search Linux Wireless

Re: [PATCH 2/2] ath: Make ath_printk void not int and remove unused struct ath_common *

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

 



On Mon, 2011-08-29 at 14:12 -0400, John W. Linville wrote:
> On Fri, Aug 26, 2011 at 01:56:39AM -0700, Joe Perches wrote:
> > Changing the return type and removing the unused argument from
> > ath_printk reduces code size.
> > Add an __always_unused struct ath_common * to the macros
> > that call ath_printk to avoid unused variable warnings.
> > $ size drivers/net/wireless/ath/built-in.o*
> >    text	   data	    bss	    dec	    hex	filename
> > 1159859	  16235	 212000	1388094	 152e3e	drivers/net/wireless/ath/built-in.o.new
> > 1164175	  16235	 212032	1392442	 153f3a	drivers/net/wireless/ath/built-in.o.old
[]
> > +#define _ath_printk(level, common, fmt, ...)			\
> > +do {								\
> > +	__always_unused struct ath_common *unused = common;	\
> > +	ath_printk(level, fmt, ##__VA_ARGS__);			\
> > +} while (0)
[]
> >  #define ath_emerg(common, fmt, ...)				\
> > -	ath_printk(KERN_EMERG, common, fmt, ##__VA_ARGS__)
> > +	_ath_printk(KERN_EMERG, common, fmt, ##__VA_ARGS__)
[]
> Any reason to preserve all these "common" args?

ath_dbg uses common, the other ath_<level>s do not.

So, other than to avoid modifying all the current uses?
Maybe just consistency or a future use case.

Or not.

I think using the macro to avoid larger line changes is
an acceptable minimal change.


--
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