Skip to contentSkip to conversation

drivers: wlan-ng: fixed a coding style issue

PATCH In review Jannik Becher 2 participants 2 messages Sep 22, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: wlan-ng: fixed a coding style issue

changed comparison "wlandev == NULL" to "!wlandev" to obtain the coding style.

---
 drivers/staging/wlan-ng/cfg80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/cfg80211.c +1 -1
index f46dfe6..5ba41c5 100644
@@ -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 */
Signature · 1 line
2.9.3
#1 lore raw
Quoted 2 lines · Jannik Becher

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

drivers/staging/wlan-ng/cfg80211.c

Quoted 1 line
drivers/staging/wlan-ng/cfg80211.c +0 -0

[]

drivers/staging/wlan-ng/cfg80211.c static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev, · line 308

Quoted 6 lines
drivers/staging/wlan-ng/cfg80211.c +0 -0
@@ -305,7 +305,7 @@ static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev,


  memset(sinfo, 0, sizeof(*sinfo));

drivers/staging/wlan-ng/cfg80211.c +1 -1
-	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)