linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] wlan-ng: checkpatch.pl cleanup series
@ 2020-12-22 22:20 Johannes Czekay
  2020-12-22 22:20 ` [PATCH 1/6] wlan-ng: clean up line ending Johannes Czekay
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Johannes Czekay @ 2020-12-22 22:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: johannes.czekay, nicolai.fischer, gustavo, hannes, longman,
	mhocko, adawesomeguy222, igormtorrente, sylphrenadin,
	izabela.bakollari, colin.king, steff.richards.the.third

Hi,

This patch series cleans up all the checkpatch.pl related warnings in the
wlan-ng module. I tried to resolve those issues in a sensible manner.

Johannes Czekay (6):
  wlan-ng: clean up line ending
  wlan-ng: clean up spinlock_t definition
  wlan-ng: rename macros
  wlan-ng: clean up line length
  wlan-ng: clean up alignment
  wlan-ng: clean up reused macros

 drivers/staging/wlan-ng/cfg80211.c         | 33 ++++++++-------
 drivers/staging/wlan-ng/hfa384x.h          |  2 +-
 drivers/staging/wlan-ng/p80211metadef.h    | 24 +++++------
 drivers/staging/wlan-ng/p80211metastruct.h | 18 +-------
 drivers/staging/wlan-ng/p80211netdev.c     |  2 +-
 drivers/staging/wlan-ng/p80211req.c        |  6 +--
 drivers/staging/wlan-ng/prism2mgmt.c       | 48 ++++++----------------
 drivers/staging/wlan-ng/prism2mib.c        | 18 ++++----
 8 files changed, 56 insertions(+), 95 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/6] wlan-ng: clean up line ending
  2020-12-22 22:20 [PATCH 0/6] wlan-ng: checkpatch.pl cleanup series Johannes Czekay
@ 2020-12-22 22:20 ` Johannes Czekay
  2020-12-22 22:20 ` [PATCH 2/6] wlan-ng: clean up spinlock_t definition Johannes Czekay
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Johannes Czekay @ 2020-12-22 22:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: johannes.czekay, nicolai.fischer, gustavo, hannes, longman,
	mhocko, adawesomeguy222, igormtorrente, sylphrenadin,
	izabela.bakollari, colin.king, steff.richards.the.third

This patch cleans up all the "Lines should not end with a '('" warnings.

Signed-off-by: Johannes Czekay <johannes.czekay@fau.de>
Co-developed-by: Nicolai Fischer <nicolai.fischer@fau.de>
Signed-off-by: Nicolai Fischer <nicolai.fischer@fau.de>
---
 drivers/staging/wlan-ng/cfg80211.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
index 759e475e303c..eda5b5a4e089 100644
--- a/drivers/staging/wlan-ng/cfg80211.c
+++ b/drivers/staging/wlan-ng/cfg80211.c
@@ -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;
@@ -478,8 +477,7 @@ static int prism2_connect(struct wiphy *wiphy, struct net_device *dev,
 				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);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/6] wlan-ng: clean up spinlock_t definition
  2020-12-22 22:20 [PATCH 0/6] wlan-ng: checkpatch.pl cleanup series Johannes Czekay
  2020-12-22 22:20 ` [PATCH 1/6] wlan-ng: clean up line ending Johannes Czekay
@ 2020-12-22 22:20 ` Johannes Czekay
  2020-12-22 22:20 ` [PATCH 3/6] wlan-ng: rename macros Johannes Czekay
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Johannes Czekay @ 2020-12-22 22:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: johannes.czekay, nicolai.fischer, gustavo, hannes, longman,
	mhocko, adawesomeguy222, igormtorrente, sylphrenadin,
	izabela.bakollari, colin.king, steff.richards.the.third

This patch cleans up a "spinlock_t definition without comment" warning in
hfa384x.h.

Signed-off-by: Johannes Czekay <johannes.czekay@fau.de>
Co-developed-by: Nicolai Fischer <nicolai.fischer@fau.de>
Signed-off-by: Nicolai Fischer <nicolai.fischer@fau.de>
---
 drivers/staging/wlan-ng/hfa384x.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 88e894dd3568..13ab9545a066 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -1184,7 +1184,7 @@ struct hfa384x_usbctlx {
 };
 
 struct hfa384x_usbctlxq {
-	spinlock_t lock;
+	spinlock_t lock;	/* Lock for CTLX que */
 	struct list_head pending;
 	struct list_head active;
 	struct list_head completing;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/6] wlan-ng: rename macros
  2020-12-22 22:20 [PATCH 0/6] wlan-ng: checkpatch.pl cleanup series Johannes Czekay
  2020-12-22 22:20 ` [PATCH 1/6] wlan-ng: clean up line ending Johannes Czekay
  2020-12-22 22:20 ` [PATCH 2/6] wlan-ng: clean up spinlock_t definition Johannes Czekay
@ 2020-12-22 22:20 ` Johannes Czekay
  2020-12-22 22:20 ` [PATCH 4/6] wlan-ng: clean up line length Johannes Czekay
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Johannes Czekay @ 2020-12-22 22:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: johannes.czekay, nicolai.fischer, gustavo, hannes, longman,
	mhocko, adawesomeguy222, igormtorrente, sylphrenadin,
	izabela.bakollari, colin.king, steff.richards.the.third

This patch renames some of the macros defined in "p80211metadef.h" in
order to fix some of the line length related warnings from checkpatch.
Since these macros are very long, fitting them within the given line
length would be really hard otherwise.

Signed-off-by: Johannes Czekay <johannes.czekay@fau.de>
Co-developed-by: Nicolai Fischer <nicolai.fischer@fau.de>
Signed-off-by: Nicolai Fischer <nicolai.fischer@fau.de>
---
 drivers/staging/wlan-ng/cfg80211.c      | 18 +++++++++---------
 drivers/staging/wlan-ng/p80211metadef.h | 24 ++++++++++++------------
 drivers/staging/wlan-ng/p80211netdev.c  |  2 +-
 drivers/staging/wlan-ng/p80211req.c     |  6 +++---
 drivers/staging/wlan-ng/prism2mib.c     | 18 +++++++++---------
 5 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
index eda5b5a4e089..bdb1e6677cc7 100644
--- a/drivers/staging/wlan-ng/cfg80211.c
+++ b/drivers/staging/wlan-ng/cfg80211.c
@@ -159,7 +159,7 @@ static int prism2_add_key(struct wiphy *wiphy, struct net_device *dev,
 	}
 
 	if (prism2_domibset_uint32(wlandev,
-				   DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID,
+				   DIDMIB_DOT11SMT_PRIVACYTBL_WEPDEFAULTKEYID,
 				   key_index))
 		return -EFAULT;
 
@@ -232,7 +232,7 @@ static int prism2_set_default_key(struct wiphy *wiphy, struct net_device *dev,
 	struct wlandevice *wlandev = dev->ml_priv;
 
 	return  prism2_domibset_uint32(wlandev,
-				       DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID,
+				       DIDMIB_DOT11SMT_PRIVACYTBL_WEPDEFAULTKEYID,
 				       key_index);
 }
 
@@ -401,7 +401,7 @@ static int prism2_set_wiphy_params(struct wiphy *wiphy, u32 changed)
 			data = wiphy->rts_threshold;
 
 		result = prism2_domibset_uint32(wlandev,
-						DIDMIB_DOT11MAC_OPERATIONTABLE_RTSTHRESHOLD,
+						DIDMIB_DOT11MAC_OPERATIONTBL_RTSTHRESHOLD,
 						data);
 		if (result) {
 			err = -EFAULT;
@@ -416,7 +416,7 @@ static int prism2_set_wiphy_params(struct wiphy *wiphy, u32 changed)
 			data = wiphy->frag_threshold;
 
 		result = prism2_domibset_uint32(wlandev,
-						DIDMIB_DOT11MAC_OPERATIONTABLE_FRAGMENTATIONTHRESHOLD,
+						DIDMIB_DOT11MAC_OPERATIONTBL_FRAGMENTATIONTHRESHOLD,
 						data);
 		if (result) {
 			err = -EFAULT;
@@ -471,7 +471,7 @@ static int prism2_connect(struct wiphy *wiphy, struct net_device *dev,
 				return -EINVAL;
 
 			result = prism2_domibset_uint32(wlandev,
-				DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID,
+				DIDMIB_DOT11SMT_PRIVACYTBL_WEPDEFAULTKEYID,
 				sme->key_idx);
 			if (result)
 				goto exit;
@@ -490,13 +490,13 @@ static int prism2_connect(struct wiphy *wiphy, struct net_device *dev,
 		 * seems reasonable anyways
 		 */
 		result = prism2_domibset_uint32(wlandev,
-						DIDMIB_DOT11SMT_PRIVACYTABLE_PRIVACYINVOKED,
+						DIDMIB_DOT11SMT_PRIVACYTBL_PRIVACYINVOKED,
 						P80211ENUM_truth_true);
 		if (result)
 			goto exit;
 
 		result = prism2_domibset_uint32(wlandev,
-						DIDMIB_DOT11SMT_PRIVACYTABLE_EXCLUDEUNENCRYPTED,
+						DIDMIB_DOT11SMT_PRIVACYTBL_EXCLUDEUNENCRYPTED,
 						P80211ENUM_truth_true);
 		if (result)
 			goto exit;
@@ -506,13 +506,13 @@ static int prism2_connect(struct wiphy *wiphy, struct net_device *dev,
 		 * and exclude unencrypted
 		 */
 		result = prism2_domibset_uint32(wlandev,
-						DIDMIB_DOT11SMT_PRIVACYTABLE_PRIVACYINVOKED,
+						DIDMIB_DOT11SMT_PRIVACYTBL_PRIVACYINVOKED,
 						P80211ENUM_truth_false);
 		if (result)
 			goto exit;
 
 		result = prism2_domibset_uint32(wlandev,
-						DIDMIB_DOT11SMT_PRIVACYTABLE_EXCLUDEUNENCRYPTED,
+						DIDMIB_DOT11SMT_PRIVACYTBL_EXCLUDEUNENCRYPTED,
 						P80211ENUM_truth_false);
 		if (result)
 			goto exit;
diff --git a/drivers/staging/wlan-ng/p80211metadef.h b/drivers/staging/wlan-ng/p80211metadef.h
index 1b91b64c12ed..68c17c85279a 100644
--- a/drivers/staging/wlan-ng/p80211metadef.h
+++ b/drivers/staging/wlan-ng/p80211metadef.h
@@ -158,51 +158,51 @@
 #define didmib_dot11smt_wepdefaultkeystable_key(_i) \
 			(DIDMIB_DOT11SMT_WEPDEFAULTKEYSTABLE | \
 			P80211DID_MKITEM(_i) | 0x0c000000)
-#define DIDMIB_DOT11SMT_PRIVACYTABLE \
+#define DIDMIB_DOT11SMT_PRIVACYTBL \
 			(P80211DID_MKSECTION(1) | \
 			P80211DID_MKGROUP(6))
-#define DIDMIB_DOT11SMT_PRIVACYTABLE_PRIVACYINVOKED \
+#define DIDMIB_DOT11SMT_PRIVACYTBL_PRIVACYINVOKED \
 			(P80211DID_MKSECTION(1) | \
 			P80211DID_MKGROUP(6) | \
 			P80211DID_MKITEM(1) | 0x18000000)
-#define DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID \
+#define DIDMIB_DOT11SMT_PRIVACYTBL_WEPDEFAULTKEYID \
 			(P80211DID_MKSECTION(1) | \
 			P80211DID_MKGROUP(6) | \
 			P80211DID_MKITEM(2) | 0x18000000)
-#define DIDMIB_DOT11SMT_PRIVACYTABLE_EXCLUDEUNENCRYPTED \
+#define DIDMIB_DOT11SMT_PRIVACYTBL_EXCLUDEUNENCRYPTED \
 			(P80211DID_MKSECTION(1) | \
 			P80211DID_MKGROUP(6) | \
 			P80211DID_MKITEM(4) | 0x18000000)
-#define DIDMIB_DOT11MAC_OPERATIONTABLE \
+#define DIDMIB_DOT11MAC_OPERATIONTBL \
 			(P80211DID_MKSECTION(2) | \
 			P80211DID_MKGROUP(1))
-#define DIDMIB_DOT11MAC_OPERATIONTABLE_MACADDRESS \
+#define DIDMIB_DOT11MAC_OPERATIONTBL_MACADDRESS \
 			(P80211DID_MKSECTION(2) | \
 			P80211DID_MKGROUP(1) | \
 			P80211DID_MKITEM(1) | 0x18000000)
-#define DIDMIB_DOT11MAC_OPERATIONTABLE_RTSTHRESHOLD \
+#define DIDMIB_DOT11MAC_OPERATIONTBL_RTSTHRESHOLD \
 			(P80211DID_MKSECTION(2) | \
 			P80211DID_MKGROUP(1) | \
 			P80211DID_MKITEM(2) | 0x18000000)
-#define DIDMIB_DOT11MAC_OPERATIONTABLE_SHORTRETRYLIMIT \
+#define DIDMIB_DOT11MAC_OPERATIONTBL_SHORTRETRYLIMIT \
 			(P80211DID_MKSECTION(2) | \
 			P80211DID_MKGROUP(1) | \
 			P80211DID_MKITEM(3) | 0x10000000)
-#define DIDMIB_DOT11MAC_OPERATIONTABLE_LONGRETRYLIMIT \
+#define DIDMIB_DOT11MAC_OPERATIONTBL_LONGRETRYLIMIT \
 			(P80211DID_MKSECTION(2) | \
 			P80211DID_MKGROUP(1) | \
 			P80211DID_MKITEM(4) | 0x10000000)
-#define DIDMIB_DOT11MAC_OPERATIONTABLE_FRAGMENTATIONTHRESHOLD \
+#define DIDMIB_DOT11MAC_OPERATIONTBL_FRAGMENTATIONTHRESHOLD \
 			(P80211DID_MKSECTION(2) | \
 			P80211DID_MKGROUP(1) | \
 			P80211DID_MKITEM(5) | 0x18000000)
-#define DIDMIB_DOT11MAC_OPERATIONTABLE_MAXTRANSMITMSDULIFETIME \
+#define DIDMIB_DOT11MAC_OPERATIONTBL_MAXTRANSMITMSDULIFETIME \
 			(P80211DID_MKSECTION(2) | \
 			P80211DID_MKGROUP(1) | \
 			P80211DID_MKITEM(6) | 0x10000000)
 #define DIDMIB_CAT_DOT11PHY \
 			P80211DID_MKSECTION(3)
-#define DIDMIB_DOT11PHY_OPERATIONTABLE \
+#define DIDMIB_DOT11PHY_OPERATIONTBL \
 			(P80211DID_MKSECTION(3) | \
 			P80211DID_MKGROUP(1))
 #define DIDMIB_DOT11PHY_TXPOWERTABLE_CURRENTTXPOWERLEVEL \
diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c
index a15abb2c8f54..36db73c38846 100644
--- a/drivers/staging/wlan-ng/p80211netdev.c
+++ b/drivers/staging/wlan-ng/p80211netdev.c
@@ -649,7 +649,7 @@ static int p80211knetdev_set_mac_address(struct net_device *dev, void *addr)
 	mibattr->status = P80211ENUM_msgitem_status_data_ok;
 	mibattr->len = sizeof(mibattr->data);
 
-	macaddr->did = DIDMIB_DOT11MAC_OPERATIONTABLE_MACADDRESS;
+	macaddr->did = DIDMIB_DOT11MAC_OPERATIONTBL_MACADDRESS;
 	macaddr->status = P80211ENUM_msgitem_status_data_ok;
 	macaddr->len = sizeof(macaddr->data);
 	macaddr->data.len = ETH_ALEN;
diff --git a/drivers/staging/wlan-ng/p80211req.c b/drivers/staging/wlan-ng/p80211req.c
index 9f5c1267d829..2c079e593e37 100644
--- a/drivers/staging/wlan-ng/p80211req.c
+++ b/drivers/staging/wlan-ng/p80211req.c
@@ -215,7 +215,7 @@ static void p80211req_mibset_mibget(struct wlandevice *wlandev,
 				       key, pstr->len);
 		break;
 
-	case DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID: {
+	case DIDMIB_DOT11SMT_PRIVACYTBL_WEPDEFAULTKEYID: {
 		u32 *data = (u32 *)mibitem->data;
 
 		if (isget) {
@@ -226,14 +226,14 @@ static void p80211req_mibset_mibget(struct wlandevice *wlandev,
 		}
 		break;
 	}
-	case DIDMIB_DOT11SMT_PRIVACYTABLE_PRIVACYINVOKED: {
+	case DIDMIB_DOT11SMT_PRIVACYTBL_PRIVACYINVOKED: {
 		u32 *data = (u32 *)mibitem->data;
 
 		p80211req_handle_action(wlandev, data, isget,
 					HOSTWEP_PRIVACYINVOKED);
 		break;
 	}
-	case DIDMIB_DOT11SMT_PRIVACYTABLE_EXCLUDEUNENCRYPTED: {
+	case DIDMIB_DOT11SMT_PRIVACYTBL_EXCLUDEUNENCRYPTED: {
 		u32 *data = (u32 *)mibitem->data;
 
 		p80211req_handle_action(wlandev, data, isget,
diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c
index 875812a391c9..16107612acdc 100644
--- a/drivers/staging/wlan-ng/prism2mib.c
+++ b/drivers/staging/wlan-ng/prism2mib.c
@@ -158,42 +158,42 @@ static struct mibrec mibtab[] = {
 	 F_STA | F_WRITE,
 	 HFA384x_RID_CNFWEPDEFAULTKEY3, 0, 0,
 	 prism2mib_wepdefaultkey},
-	{DIDMIB_DOT11SMT_PRIVACYTABLE_PRIVACYINVOKED,
+	{DIDMIB_DOT11SMT_PRIVACYTBL_PRIVACYINVOKED,
 	 F_STA | F_READ | F_WRITE,
 	 HFA384x_RID_CNFWEPFLAGS, HFA384x_WEPFLAGS_PRIVINVOKED, 0,
 	 prism2mib_privacyinvoked},
-	{DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID,
+	{DIDMIB_DOT11SMT_PRIVACYTBL_WEPDEFAULTKEYID,
 	 F_STA | F_READ | F_WRITE,
 	 HFA384x_RID_CNFWEPDEFAULTKEYID, 0, 0,
 	 prism2mib_uint32},
-	{DIDMIB_DOT11SMT_PRIVACYTABLE_EXCLUDEUNENCRYPTED,
+	{DIDMIB_DOT11SMT_PRIVACYTBL_EXCLUDEUNENCRYPTED,
 	 F_STA | F_READ | F_WRITE,
 	 HFA384x_RID_CNFWEPFLAGS, HFA384x_WEPFLAGS_EXCLUDE, 0,
 	 prism2mib_flag},
 
 	/* dot11mac MIB's */
 
-	{DIDMIB_DOT11MAC_OPERATIONTABLE_MACADDRESS,
+	{DIDMIB_DOT11MAC_OPERATIONTBL_MACADDRESS,
 	 F_STA | F_READ | F_WRITE,
 	 HFA384x_RID_CNFOWNMACADDR, HFA384x_RID_CNFOWNMACADDR_LEN, 0,
 	 prism2mib_bytearea2pstr},
-	{DIDMIB_DOT11MAC_OPERATIONTABLE_RTSTHRESHOLD,
+	{DIDMIB_DOT11MAC_OPERATIONTBL_RTSTHRESHOLD,
 	 F_STA | F_READ | F_WRITE,
 	 HFA384x_RID_RTSTHRESH, 0, 0,
 	 prism2mib_uint32},
-	{DIDMIB_DOT11MAC_OPERATIONTABLE_SHORTRETRYLIMIT,
+	{DIDMIB_DOT11MAC_OPERATIONTBL_SHORTRETRYLIMIT,
 	 F_STA | F_READ,
 	 HFA384x_RID_SHORTRETRYLIMIT, 0, 0,
 	 prism2mib_uint32},
-	{DIDMIB_DOT11MAC_OPERATIONTABLE_LONGRETRYLIMIT,
+	{DIDMIB_DOT11MAC_OPERATIONTBL_LONGRETRYLIMIT,
 	 F_STA | F_READ,
 	 HFA384x_RID_LONGRETRYLIMIT, 0, 0,
 	 prism2mib_uint32},
-	{DIDMIB_DOT11MAC_OPERATIONTABLE_FRAGMENTATIONTHRESHOLD,
+	{DIDMIB_DOT11MAC_OPERATIONTBL_FRAGMENTATIONTHRESHOLD,
 	 F_STA | F_READ | F_WRITE,
 	 HFA384x_RID_FRAGTHRESH, 0, 0,
 	 prism2mib_fragmentationthreshold},
-	{DIDMIB_DOT11MAC_OPERATIONTABLE_MAXTRANSMITMSDULIFETIME,
+	{DIDMIB_DOT11MAC_OPERATIONTBL_MAXTRANSMITMSDULIFETIME,
 	 F_STA | F_READ,
 	 HFA384x_RID_MAXTXLIFETIME, 0, 0,
 	 prism2mib_uint32},
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/6] wlan-ng: clean up line length
  2020-12-22 22:20 [PATCH 0/6] wlan-ng: checkpatch.pl cleanup series Johannes Czekay
                   ` (2 preceding siblings ...)
  2020-12-22 22:20 ` [PATCH 3/6] wlan-ng: rename macros Johannes Czekay
@ 2020-12-22 22:20 ` Johannes Czekay
  2020-12-22 22:20 ` [PATCH 5/6] wlan-ng: clean up alignment Johannes Czekay
  2020-12-22 22:20 ` [PATCH 6/6] wlan-ng: clean up reused macros Johannes Czekay
  5 siblings, 0 replies; 8+ messages in thread
From: Johannes Czekay @ 2020-12-22 22:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: johannes.czekay, nicolai.fischer, gustavo, hannes, longman,
	mhocko, adawesomeguy222, igormtorrente, sylphrenadin,
	izabela.bakollari, colin.king, steff.richards.the.third

This patch cleans up all remaining line length related warnings.

Signed-off-by: Johannes Czekay <johannes.czekay@fau.de>
Co-developed-by: Nicolai Fischer <nicolai.fischer@fau.de>
Signed-off-by: Nicolai Fischer <nicolai.fischer@fau.de>
---
 drivers/staging/wlan-ng/cfg80211.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
index bdb1e6677cc7..0e44a0f73a6a 100644
--- a/drivers/staging/wlan-ng/cfg80211.c
+++ b/drivers/staging/wlan-ng/cfg80211.c
@@ -365,7 +365,8 @@ static int prism2_scan(struct wiphy *wiphy,
 					  msg2.beaconperiod.data,
 					  ie_buf,
 					  ie_len,
-					  (msg2.signal.data - 65536) * 100, /* Conversion to signed type */
+					  /* Conversion to signed type */
+					  (msg2.signal.data - 65536) * 100,
 					  GFP_KERNEL);
 
 		if (!bss) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/6] wlan-ng: clean up alignment
  2020-12-22 22:20 [PATCH 0/6] wlan-ng: checkpatch.pl cleanup series Johannes Czekay
                   ` (3 preceding siblings ...)
  2020-12-22 22:20 ` [PATCH 4/6] wlan-ng: clean up line length Johannes Czekay
@ 2020-12-22 22:20 ` Johannes Czekay
  2020-12-22 22:20 ` [PATCH 6/6] wlan-ng: clean up reused macros Johannes Czekay
  5 siblings, 0 replies; 8+ messages in thread
From: Johannes Czekay @ 2020-12-22 22:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: johannes.czekay, nicolai.fischer, gustavo, hannes, longman,
	mhocko, adawesomeguy222, igormtorrente, sylphrenadin,
	izabela.bakollari, colin.king, steff.richards.the.third

This patch cleans up all the alignment related warnings from checkpatch.

Signed-off-by: Johannes Czekay <johannes.czekay@fau.de>
Co-developed-by: Nicolai Fischer <nicolai.fischer@fau.de>
Signed-off-by: Nicolai Fischer <nicolai.fischer@fau.de>
---
 drivers/staging/wlan-ng/cfg80211.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
index 0e44a0f73a6a..ac62746cf92e 100644
--- a/drivers/staging/wlan-ng/cfg80211.c
+++ b/drivers/staging/wlan-ng/cfg80211.c
@@ -472,8 +472,8 @@ static int prism2_connect(struct wiphy *wiphy, struct net_device *dev,
 				return -EINVAL;
 
 			result = prism2_domibset_uint32(wlandev,
-				DIDMIB_DOT11SMT_PRIVACYTBL_WEPDEFAULTKEYID,
-				sme->key_idx);
+							DIDMIB_DOT11SMT_PRIVACYTBL_WEPDEFAULTKEYID,
+							sme->key_idx);
 			if (result)
 				goto exit;
 
@@ -584,8 +584,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;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/6] wlan-ng: clean up reused macros
  2020-12-22 22:20 [PATCH 0/6] wlan-ng: checkpatch.pl cleanup series Johannes Czekay
                   ` (4 preceding siblings ...)
  2020-12-22 22:20 ` [PATCH 5/6] wlan-ng: clean up alignment Johannes Czekay
@ 2020-12-22 22:20 ` Johannes Czekay
  5 siblings, 0 replies; 8+ messages in thread
From: Johannes Czekay @ 2020-12-22 22:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: johannes.czekay, nicolai.fischer, gustavo, hannes, longman,
	mhocko, adawesomeguy222, igormtorrente, sylphrenadin,
	izabela.bakollari, colin.king, steff.richards.the.third

This patch cleans up two "macro argument reuse" warnings by checkpatch.
This should also make the code much more readable.

Signed-off-by: Johannes Czekay <johannes.czekay@fau.de>
Co-developed-by: Nicolai Fischer <nicolai.fischer@fau.de>
Signed-off-by: Nicolai Fischer <nicolai.fischer@fau.de>
---
 drivers/staging/wlan-ng/p80211metastruct.h | 18 +-------
 drivers/staging/wlan-ng/prism2mgmt.c       | 48 ++++++----------------
 2 files changed, 14 insertions(+), 52 deletions(-)

diff --git a/drivers/staging/wlan-ng/p80211metastruct.h b/drivers/staging/wlan-ng/p80211metastruct.h
index 4adc64580185..e963227f797c 100644
--- a/drivers/staging/wlan-ng/p80211metastruct.h
+++ b/drivers/staging/wlan-ng/p80211metastruct.h
@@ -114,22 +114,8 @@ struct p80211msg_dot11req_scan_results {
 	struct p80211item_uint32 cfpollreq;
 	struct p80211item_uint32 privacy;
 	struct p80211item_uint32 capinfo;
-	struct p80211item_uint32 basicrate1;
-	struct p80211item_uint32 basicrate2;
-	struct p80211item_uint32 basicrate3;
-	struct p80211item_uint32 basicrate4;
-	struct p80211item_uint32 basicrate5;
-	struct p80211item_uint32 basicrate6;
-	struct p80211item_uint32 basicrate7;
-	struct p80211item_uint32 basicrate8;
-	struct p80211item_uint32 supprate1;
-	struct p80211item_uint32 supprate2;
-	struct p80211item_uint32 supprate3;
-	struct p80211item_uint32 supprate4;
-	struct p80211item_uint32 supprate5;
-	struct p80211item_uint32 supprate6;
-	struct p80211item_uint32 supprate7;
-	struct p80211item_uint32 supprate8;
+	struct p80211item_uint32 basicrate[8];
+	struct p80211item_uint32 supprate[8];
 } __packed;
 
 struct p80211msg_dot11req_start {
diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c
index 1bd36dc2b7ff..8540c3336907 100644
--- a/drivers/staging/wlan-ng/prism2mgmt.c
+++ b/drivers/staging/wlan-ng/prism2mgmt.c
@@ -388,6 +388,7 @@ int prism2mgmt_scan_results(struct wlandevice *wlandev, void *msgp)
 	struct hfa384x_hscan_result_sub *item = NULL;
 
 	int count;
+	int i;
 
 	req = msgp;
 
@@ -437,42 +438,17 @@ int prism2mgmt_scan_results(struct wlandevice *wlandev, void *msgp)
 		if (item->supprates[count] == 0)
 			break;
 
-#define REQBASICRATE(N) \
-	do { \
-		if ((count >= (N)) && DOT11_RATE5_ISBASIC_GET(	\
-			item->supprates[(N) - 1])) { \
-			req->basicrate ## N .data = item->supprates[(N) - 1]; \
-			req->basicrate ## N .status = \
-				P80211ENUM_msgitem_status_data_ok; \
-		} \
-	} while (0)
-
-	REQBASICRATE(1);
-	REQBASICRATE(2);
-	REQBASICRATE(3);
-	REQBASICRATE(4);
-	REQBASICRATE(5);
-	REQBASICRATE(6);
-	REQBASICRATE(7);
-	REQBASICRATE(8);
-
-#define REQSUPPRATE(N) \
-	do { \
-		if (count >= (N)) {					\
-			req->supprate ## N .data = item->supprates[(N) - 1]; \
-			req->supprate ## N .status = \
-				P80211ENUM_msgitem_status_data_ok; \
-		} \
-	} while (0)
-
-	REQSUPPRATE(1);
-	REQSUPPRATE(2);
-	REQSUPPRATE(3);
-	REQSUPPRATE(4);
-	REQSUPPRATE(5);
-	REQSUPPRATE(6);
-	REQSUPPRATE(7);
-	REQSUPPRATE(8);
+	for (i = 0; i < 8; i++) {
+		if (count > 1) {
+			if (DOT11_RATE5_ISBASIC_GET(item->supprates[i])) {
+				req->basicrate[i].data = item->supprates[i];
+				req->basicrate[i].status = P80211ENUM_msgitem_status_data_ok;
+			}
+
+			req->supprate[i].data = item->supprates[i];
+			req->supprate[i].status = P80211ENUM_msgitem_status_data_ok;
+		}
+	}
 
 	/* beacon period */
 	req->beaconperiod.status = P80211ENUM_msgitem_status_data_ok;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/6] wlan-ng: clean up line length
  2021-01-18  1:09 [PATCH 0/6] wlan-ng: checkpatch.pl cleanup series Johannes Czekay
@ 2021-01-18  1:09 ` Johannes Czekay
  0 siblings, 0 replies; 8+ messages in thread
From: Johannes Czekay @ 2021-01-18  1:09 UTC (permalink / raw)
  To: gregkh
  Cc: nicolai.fischer, johannes.czekay, jbwyatt4, rkovhaev, hqjagain,
	gustavo, devel, linux-kernel, linux-kernel

This patch cleans up all remaining line length related warnings.

Signed-off-by: Johannes Czekay <johannes.czekay@fau.de>
Co-developed-by: Nicolai Fischer <nicolai.fischer@fau.de>
Signed-off-by: Nicolai Fischer <nicolai.fischer@fau.de>
---
 drivers/staging/wlan-ng/cfg80211.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
index bdb1e6677cc7..0e44a0f73a6a 100644
--- a/drivers/staging/wlan-ng/cfg80211.c
+++ b/drivers/staging/wlan-ng/cfg80211.c
@@ -365,7 +365,8 @@ static int prism2_scan(struct wiphy *wiphy,
 					  msg2.beaconperiod.data,
 					  ie_buf,
 					  ie_len,
-					  (msg2.signal.data - 65536) * 100, /* Conversion to signed type */
+					  /* Conversion to signed type */
+					  (msg2.signal.data - 65536) * 100,
 					  GFP_KERNEL);
 
 		if (!bss) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-01-18  1:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-22 22:20 [PATCH 0/6] wlan-ng: checkpatch.pl cleanup series Johannes Czekay
2020-12-22 22:20 ` [PATCH 1/6] wlan-ng: clean up line ending Johannes Czekay
2020-12-22 22:20 ` [PATCH 2/6] wlan-ng: clean up spinlock_t definition Johannes Czekay
2020-12-22 22:20 ` [PATCH 3/6] wlan-ng: rename macros Johannes Czekay
2020-12-22 22:20 ` [PATCH 4/6] wlan-ng: clean up line length Johannes Czekay
2020-12-22 22:20 ` [PATCH 5/6] wlan-ng: clean up alignment Johannes Czekay
2020-12-22 22:20 ` [PATCH 6/6] wlan-ng: clean up reused macros Johannes Czekay
2021-01-18  1:09 [PATCH 0/6] wlan-ng: checkpatch.pl cleanup series Johannes Czekay
2021-01-18  1:09 ` [PATCH 4/6] wlan-ng: clean up line length Johannes Czekay

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).