linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Joe Perches <joe@perches.com>, Ola Olsson <ola1olsson@gmail.com>
Cc: "ola. olsson" <ola.olsson@sonymobile.com>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] Print warnings for missing cfg80211_ops implementations
Date: Thu, 17 Dec 2015 13:43:07 +0100	[thread overview]
Message-ID: <1450356187.8247.30.camel@sipsolutions.net> (raw)
In-Reply-To: <1450350106.3430.5.camel@perches.com>

On Thu, 2015-12-17 at 03:01 -0800, Joe Perches wrote:

> Following patterns is good, I just think the
> pattern could be trivially improved.

It's a question of what makes sense though - nobody implements stop_xyz
without implementing start_xyz, and even if they do it's pointless.
It's just that if you have start_xyz most/all of your functional tests
might work, but we'd really like to have stop_xyz as well.

It's not *worse* to check for the XOR (like you suggest below), but
it's not really any better either.

> The test is a runtime check on what would ideally
> be done at compile time.

If you have any suggestions how to do that then that'd be great :) I
don't really see a way of doing that since this depends on the driver
and the driver might even fill the struct at runtime (like hwsim does
IIRC)

> Using
> 	WARN_ON(!a ^ !b)
> which is logically the same as what I wrote above
> for clarity is simply a bit more coverage and maybe
> even a bit run-time faster.

Don't think we have to worry much about the runtime overhead, but
that's a nice idea. As I said above though, I don't think it really
makes a difference.

johannes

      parent reply	other threads:[~2015-12-17 12:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-16 21:43 [PATCH] Print warnings for missing cfg80211_ops implementations Ola Olsson
2015-12-17  1:16 ` Joe Perches
     [not found]   ` <CABAco3BSaB9R6-nZQsmOnfXXy2ra-un0jjeBkyq4inzCybD5dw@mail.gmail.com>
2015-12-17  5:19     ` Joe Perches
2015-12-17  7:34       ` Ola Olsson
2015-12-17  7:57         ` Johannes Berg
2015-12-17 11:01           ` Joe Perches
2015-12-17 11:43             ` Ola Olsson
2015-12-17 12:43             ` Johannes Berg [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=1450356187.8247.30.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=joe@perches.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=ola.olsson@sonymobile.com \
    --cc=ola1olsson@gmail.com \
    /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).