From: Joe Perches <joe@perches.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: "Luis R. Rodriguez" <lrodriguez@atheros.com>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] ath: Make ath_printk void not int and remove unused struct ath_common *
Date: Mon, 29 Aug 2011 11:31:39 -0700 [thread overview]
Message-ID: <1314642699.6852.23.camel@Joe-Laptop> (raw)
In-Reply-To: <20110829181237.GB1406@tuxdriver.com>
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.
prev parent reply other threads:[~2011-08-29 18:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-26 8:56 [PATCH 0/2] ath: Reduce logging message code size Joe Perches
2011-08-26 8:56 ` [PATCH 1/2] ath: Make ath_dbg void not int Joe Perches
2011-08-26 8:56 ` [PATCH 2/2] ath: Make ath_printk void not int and remove unused struct ath_common * Joe Perches
2011-08-29 18:12 ` John W. Linville
2011-08-29 18:31 ` Joe Perches [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1314642699.6852.23.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@atheros.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).