Search Linux Wireless

Re: [RFC 03/20] mac80211: add drv_* wrappers for channel contexts

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

 



On Fri, 2012-07-27 at 11:08 -0700, Joe Perches wrote:

> > +static inline void drv_add_chanctx(struct ieee80211_local *local,
> > +				   struct ieee80211_chanctx *ctx)
> > +{
> > +	if (local->ops->add_chanctx)
> > +		local->ops->add_chanctx(&local->hw, &ctx->conf);
> 
> Perhaps these repeated function names should be some macro
> to avoid typos or copy/paste errors.
> 
> Maybe something like:
> 
> #define local_op(func, ...)				\
> do {							\
> 	if (local->ops->func)				\
> 		local->ops->func(##__VA_ARGS__);	\
> } while (0)
> 
> So the uses become:
> 
> 	local_op(add_chanctx, &local->hw, &ctx->conf);

Interesting idea, but no, it needs tracing -- look at the next patch in
the series. (and yes, you could play with macros to add tracing, but
that would certainly just obfuscate the code)

johannes

--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux