Search Linux Wireless

Re: [PATCH] ath5k: consistent info and error logging

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

 



On Saturday 17 November 2007 00:53:58 Johannes Berg wrote:
> On Fri, 2007-11-16 at 15:17 +0200, Kalle Valo wrote:
> > Johannes Berg <johannes@xxxxxxxxxxxxxxxx> writes:
> > >> +#define AR5K_INFO(_sc, _fmt, ...)	\
> > >> +	printk(KERN_INFO "ath5k %s: " _fmt, wiphy_name((_sc)->hw->wiphy),
> > >> ##__VA_ARGS__)
> > >
> > > Eww. Can't you make them static inlines?
> >
> > Wasn't it so that a inline function with va_args is not possible?
>
> Hmm. That might be true. 

yes, gcc tells me
"sorry, unimplemented: function ‘AR5K_INFO’ can never be inlined because it 
uses variable argument lists".

> How about just using dev_dbg? 

i thought about that, and it would be possible to change the macros to use 
dev_dbg, dev_info, etc, but i think the phyX names make the output much 
clearer and easier to match with the output from mac80211, than the PCI bus 
ids.

> Not that I really  
> ever need to look into ath5k (hopefully!), but the code just struck me
> as not very nice.

well, it's not *that* bad, and defines like this are used in many places in 
the kernel. for example rt2x00/rt2x00.h has basically the same define.

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