All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Luca Coelho <luca@coelho.fi>,
	linux-wireless@vger.kernel.org, Jason Baron <jbaron@akamai.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [RFC v2 3/4] mac80211: use static keys for hw flags
Date: Wed, 11 Nov 2015 09:18:59 -0500	[thread overview]
Message-ID: <20151111091859.55f6a4fd@gandalf.local.home> (raw)
In-Reply-To: <1447249156.2276.17.camel@sipsolutions.net>

On Wed, 11 Nov 2015 14:39:16 +0100
Johannes Berg <johannes@sipsolutions.net> wrote:

> On Wed, 2015-11-11 at 08:34 -0500, Steven Rostedt wrote:
> 
> > > config MY_DRIVER
> > > 	depends on MAC80211
> > > 	increment MAC80211_NUM_DRIVERS
> > > 	increment MAC80211_HW_MYFLAG  
> > 
> > If you don't need to check more that >0 why not just use SELECT?  
> 
> > > if (CONFIG_MAC80211_HW_MYFLAG == 0)
> > > 	/* optimise for flag OFF */
> > > else if (CONFIG_MAC80211_HW_MYFLAG > 0 &&
> > >          CONFIG_MAC80211_NUM_DRIVERS == CONFIG_MAC80211_HW_MYFLAG)
> > > 	/* optimise for flag ON */
> > > else if (CONFIG_MAC80211_HW_MYFLAG > 0)
> > > 	/* don't optimise */  
> 
> I'm comparing those numbers to see if there's a driver that's
> incrementing NUM_DRIVERS but not HW_MYFLAG.
> 

OK, I'm still a bit confused. What happens if another driver increments
NUM_DRIVERS? Then the above wont be equal right? That's what you want?

-- Steve

  reply	other threads:[~2015-11-11 14:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10  8:52 [RFC v2 0/4] mac80211: jump labels for hw flags Johannes Berg
2015-11-10  8:52 ` [RFC v2 1/4] mac80211: add ieee80211_hw_clear() Johannes Berg
2015-11-10  8:52 ` [RFC v2 2/4] mac80211: introduce ieee80211_local_check() Johannes Berg
2015-11-10  8:52 ` [RFC v2 3/4] mac80211: use static keys for hw flags Johannes Berg
2015-11-11  0:22   ` Luca Coelho
2015-11-11  7:37     ` Johannes Berg
2015-11-11 13:34       ` Steven Rostedt
2015-11-11 13:39         ` Johannes Berg
2015-11-11 14:18           ` Steven Rostedt [this message]
2015-11-11 14:29             ` Johannes Berg
2015-11-11 14:45               ` Steven Rostedt
2015-11-11 15:05                 ` Johannes Berg
2015-11-10  8:52 ` [RFC v2 4/4] mac80211: test the static key code Johannes Berg
2015-11-10  9:11 ` [RFC v2 5/4] mac80211: generate hw flags from include file Johannes Berg

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=20151111091859.55f6a4fd@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=jbaron@akamai.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luca@coelho.fi \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.