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:
quoted
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
[]
quoted
+#define _ath_printk(level, common, fmt, ...) \
+do { \
+ __always_unused struct ath_common *unused = common; \
+ ath_printk(level, fmt, ##__VA_ARGS__); \
+} while (0)
[]
quoted
#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.