lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1314642699.6852.23.camel@Joe-Laptop>
Date:	Mon, 29 Aug 2011 11:31:39 -0700
From:	Joe Perches <joe@...ches.com>
To:	"John W. Linville" <linville@...driver.com>
Cc:	"Luis R. Rodriguez" <lrodriguez@...eros.com>,
	linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] ath: Make ath_printk void not int and remove
 unused struct ath_common *

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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ