Skip to contentSkip to conversation

Staging: wlan-ng: cfg80211: fixed alignment issue with open parenthesis line ending with (

PATCH In review Merwin Trever Ferrao 2 participants 2 messages Jun 10, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 16/16 Staging: wlan-ng: cfg80211: fixed alignment issue with open parenthesis line ending with (

From: Merwin Trever Ferrao <[email protected]>

Fixed a coding style issue.

---
 drivers/staging/wlan-ng/cfg80211.c | 32 ++++++++++++++----------------
 1 file changed, 15 insertions(+), 17 deletions(-)
drivers/staging/wlan-ng/cfg80211.c +15 -17
index eee1998c4b18..5424e2682911 100644
@@ -324,8 +324,7 @@ static int prism2_scan(struct wiphy *wiphy,
 		(i < request->n_channels) && i < ARRAY_SIZE(prism2_channels);
 		i++)
 		msg1.channellist.data.data[i] =
-			ieee80211_frequency_to_channel(
-				request->channels[i]->center_freq);
+			ieee80211_frequency_to_channel(request->channels[i]->center_freq);
 	msg1.channellist.data.len = request->n_channels;
 
 	msg1.maxchanneltime.data = 250;
@@ -359,15 +358,15 @@ static int prism2_scan(struct wiphy *wiphy,
 		freq = ieee80211_channel_to_frequency(msg2.dschannel.data,
 						      NL80211_BAND_2GHZ);
 		bss = cfg80211_inform_bss(wiphy,
-			ieee80211_get_channel(wiphy, freq),
-			CFG80211_BSS_FTYPE_UNKNOWN,
-			(const u8 *)&msg2.bssid.data.data,
-			msg2.timestamp.data, msg2.capinfo.data,
-			msg2.beaconperiod.data,
-			ie_buf,
-			ie_len,
-			(msg2.signal.data - 65536) * 100, /* Conversion to signed type */
-			GFP_KERNEL
+					  ieee80211_get_channel(wiphy, freq),
+					  CFG80211_BSS_FTYPE_UNKNOWN,
+					  (const u8 *)&msg2.bssid.data.data,
+					  msg2.timestamp.data, msg2.capinfo.data,
+					  msg2.beaconperiod.data,
+					  ie_buf,
+					  ie_len,
+					  (msg2.signal.data - 65536) * 100, /* Conversion to signed type */
+					  GFP_KERNEL
 		);
 
 		if (!bss) {
@@ -475,14 +474,13 @@ static int prism2_connect(struct wiphy *wiphy, struct net_device *dev,
 			}
 
 			result = prism2_domibset_uint32(wlandev,
-				DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID,
-				sme->key_idx);
+							DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID,
+							sme->key_idx);
 			if (result)
 				goto exit;
 
 			/* send key to driver */
-			did = didmib_dot11smt_wepdefaultkeystable_key(
-					sme->key_idx + 1);
+			did = didmib_dot11smt_wepdefaultkeystable_key(sme->key_idx + 1);
 			result = prism2_domibset_pstr32(wlandev,
 							did, sme->key_len,
 							(u8 *)sme->key);
@@ -588,8 +586,8 @@ static int prism2_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
 		data = MBM_TO_DBM(mbm);
 
 	result = prism2_domibset_uint32(wlandev,
-		DIDMIB_DOT11PHY_TXPOWERTABLE_CURRENTTXPOWERLEVEL,
-		data);
+					DIDMIB_DOT11PHY_TXPOWERTABLE_CURRENTTXPOWERLEVEL,
+					data);
 
 	if (result) {
 		err = -EFAULT;
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 14 lines · Merwin Trever Ferrao

From: Merwin Trever Ferrao <[email protected]>

Fixed a coding style issue.

---
 drivers/staging/wlan-ng/cfg80211.c | 32 ++++++++++++++----------------
 1 file changed, 15 insertions(+), 17 deletions(-)
drivers/staging/wlan-ng/cfg80211.c +0 -0
index eee1998c4b18..5424e2682911 100644

drivers/staging/wlan-ng/cfg80211.c static int prism2_scan(struct wiphy *wiphy, · line 327

Quoted 6 lines
drivers/staging/wlan-ng/cfg80211.c +1 -2
@@ -324,8 +324,7 @@ static int prism2_scan(struct wiphy *wiphy,
 		(i < request->n_channels) && i < ARRAY_SIZE(prism2_channels);
 		i++)
 		msg1.channellist.data.data[i] =
-			ieee80211_frequency_to_channel(
-				request->channels[i]->center_freq);
+			ieee80211_frequency_to_channel(request->channels[i]->center_freq);

And now you violate the other coding style rule of too long lines :(

You can just keep sending patches fixing this back and forth, if you want a never-ending set of patches to be applied, but we don't really like that.

So the code is ok as-is.

Quoted 16 lines
drivers/staging/wlan-ng/cfg80211.c +0 -9
 	msg1.channellist.data.len = request->n_channels;
 
 	msg1.maxchanneltime.data = 250;
@@ -359,15 +358,15 @@ static int prism2_scan(struct wiphy *wiphy,
 		freq = ieee80211_channel_to_frequency(msg2.dschannel.data,
 						      NL80211_BAND_2GHZ);
 		bss = cfg80211_inform_bss(wiphy,
-			ieee80211_get_channel(wiphy, freq),
-			CFG80211_BSS_FTYPE_UNKNOWN,
-			(const u8 *)&msg2.bssid.data.data,
-			msg2.timestamp.data, msg2.capinfo.data,
-			msg2.beaconperiod.data,
-			ie_buf,
-			ie_len,
-			(msg2.signal.data - 65536) * 100, /* Conversion to signed type */
-			GFP_KERNEL

drivers/staging/wlan-ng/cfg80211.c static int prism2_scan(struct wiphy *wiphy, · line 370

Quoted 10 lines
drivers/staging/wlan-ng/cfg80211.c +9 -0
+					  ieee80211_get_channel(wiphy, freq),
+					  CFG80211_BSS_FTYPE_UNKNOWN,
+					  (const u8 *)&msg2.bssid.data.data,
+					  msg2.timestamp.data, msg2.capinfo.data,
+					  msg2.beaconperiod.data,
+					  ie_buf,
+					  ie_len,
+					  (msg2.signal.data - 65536) * 100, /* Conversion to signed type */
+					  GFP_KERNEL
 		);

Why is this final ); way over here?

Quoted 7 lines
drivers/staging/wlan-ng/cfg80211.c +0 -1
 		if (!bss) {
@@ -475,14 +474,13 @@ static int prism2_connect(struct wiphy *wiphy, struct net_device *dev,
 			}
 
 			result = prism2_domibset_uint32(wlandev,
-				DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID,

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

Quoted 10 lines
drivers/staging/wlan-ng/cfg80211.c +3 -3
-				sme->key_idx);
+							DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID,
+							sme->key_idx);
 			if (result)
 				goto exit;
 
 			/* send key to driver */
-			did = didmib_dot11smt_wepdefaultkeystable_key(
-					sme->key_idx + 1);
+			did = didmib_dot11smt_wepdefaultkeystable_key(sme->key_idx + 1);

Too long of a line.

Remember, checkpatch is just a "hint", you still have to use your brain when looking at the output of it.

thanks,

greg k-h