public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Jannik Becher <becher.jannik@gmail.com>, gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers: wlan-ng: fixed a coding style issue
Date: Thu, 22 Sep 2016 11:27:00 -0700	[thread overview]
Message-ID: <1474568820.8253.17.camel@perches.com> (raw)
In-Reply-To: <20160922180120.31220-1-Becher.Jannik@gmail.com>

On Thu, 2016-09-22 at 20:01 +0200, Jannik Becher wrote:
> changed comparison "wlandev == NULL" to "!wlandev" to obtain the coding
> style.

Hello.

Please always use Greg KH's latest staging-next branch (or -next)
to make these sorts of changes.  This one has already been done.

https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
$ cd staging
$ git checkout staging-next

> diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
[]
> @@ -305,7 +305,7 @@ static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev,
>  
>  	memset(sinfo, 0, sizeof(*sinfo));
>  
> -	if ((wlandev == NULL) || (wlandev->msdstate != WLAN_MSD_RUNNING))
> +	if ((!wlandev) || (wlandev->msdstate != WLAN_MSD_RUNNING))

And it might be nicer without the unnecessary parentheses too

	if (!wlandev || wlandev->msdstate != WLAN_MSD_RUNNING)

  reply	other threads:[~2016-09-22 18:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22 18:01 [PATCH] drivers: wlan-ng: fixed a coding style issue Jannik Becher
2016-09-22 18:27 ` Joe Perches [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-09-22 19:11 Jannik Becher
2016-09-22 20:32 ` Andrey Utkin
2016-09-22 20:52   ` becher.jannik
2016-09-22 21:03     ` Joe Perches
2016-09-22 21:14     ` Andrey Utkin
2016-09-22 21:56 Jannik Becher
2016-09-22 22:05 ` Joe Perches
2016-09-22 22:39   ` becher.jannik
2016-09-22 22:52     ` Joe Perches

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=1474568820.8253.17.camel@perches.com \
    --to=joe@perches.com \
    --cc=becher.jannik@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox