Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1489262 > unrolled thread
| Started by | Jannik Becher <becher.jannik@gmail.com> |
|---|---|
| First post | 2016-09-22 20:10 +0200 |
| Last post | 2016-09-22 20:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] drivers: wlan-ng: fixed a coding style issue Jannik Becher <becher.jannik@gmail.com> - 2016-09-22 20:10 +0200
Re: [PATCH] drivers: wlan-ng: fixed a coding style issue Joe Perches <joe@perches.com> - 2016-09-22 20:30 +0200
| From | Jannik Becher <becher.jannik@gmail.com> |
|---|---|
| Date | 2016-09-22 20:10 +0200 |
| Subject | [PATCH] drivers: wlan-ng: fixed a coding style issue |
| Message-ID | <skgBz-1j2-7@gated-at.bofh.it> |
changed comparison "wlandev == NULL" to "!wlandev" to obtain the coding style. Signed-off-by: Jannik Becher <Becher.Jannik@gmail.com> --- drivers/staging/wlan-ng/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c index f46dfe6..5ba41c5 100644 --- 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)) return -EOPNOTSUPP; /* build request message */ -- 2.9.3
[toc] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2016-09-22 20:30 +0200 |
| Message-ID | <skgUW-1qI-23@gated-at.bofh.it> |
| In reply to | #1489262 |
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)
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web