outreachy.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] staging: rtl8192e: code cleanup patches
@ 2023-03-23 19:19 Khadija Kamran
  2023-03-23 19:19 ` [PATCH v2 1/4] staging: rtl8192e: remove extra blank lines Khadija Kamran
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Khadija Kamran @ 2023-03-23 19:19 UTC (permalink / raw)
  To: outreachy; +Cc: gregkh, linux-staging, linux-kernel

Fix several cleanup issues reported by checkpatch.pl in module
staging/rtl8192e in file rtllib_rx.c

Changes in v2:
 - Resent patchset with the correct email address

Khadija Kamran (4):
  staging: rtl8192e: remove extra blank lines
  staging: rtl8192e: add blank lines after declarations
  staging: rtl8192e: add spaces around binary operators
  staging: rtl8192e: remove blank lines after '{'

 drivers/staging/rtl8192e/rtllib_rx.c | 73 +++++++++++-----------------
 1 file changed, 29 insertions(+), 44 deletions(-)

-- 
2.34.1


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

* [PATCH v2 1/4] staging: rtl8192e: remove extra blank lines
  2023-03-23 19:19 [PATCH v2 0/4] staging: rtl8192e: code cleanup patches Khadija Kamran
@ 2023-03-23 19:19 ` Khadija Kamran
  2023-03-24 15:41   ` Alison Schofield
  2023-03-23 19:20 ` [PATCH v2 2/4] staging: rtl8192e: add blank lines after declarations Khadija Kamran
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Khadija Kamran @ 2023-03-23 19:19 UTC (permalink / raw)
  To: outreachy; +Cc: gregkh, linux-staging, linux-kernel

Remove extra blank lines as reported by checkpatch.pl

"CHECK: Please don't use multiple blank lines"

Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
---
 drivers/staging/rtl8192e/rtllib_rx.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index c394c21beefb..c6114d99829b 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -154,7 +154,6 @@ rtllib_frag_cache_get(struct rtllib_device *ieee,
 	return skb;
 }
 
-
 /* Called only as a tasklet (software IRQ) */
 static int rtllib_frag_cache_invalidate(struct rtllib_device *ieee,
 					   struct rtllib_hdr_4addr *hdr)
@@ -318,7 +317,6 @@ rtllib_rx_frame_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
 	return res;
 }
 
-
 /* Called only as a tasklet (software IRQ), by rtllib_rx */
 static inline int
 rtllib_rx_frame_decrypt_msdu(struct rtllib_device *ieee, struct sk_buff *skb,
@@ -355,7 +353,6 @@ rtllib_rx_frame_decrypt_msdu(struct rtllib_device *ieee, struct sk_buff *skb,
 	return 0;
 }
 
-
 /* this function is stolen from ipw2200 driver*/
 #define IEEE_PACKET_RETRY_TIME (5*HZ)
 static int is_duplicate_packet(struct rtllib_device *ieee,
@@ -887,7 +884,6 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
 	return rxb->nr_subframes;
 }
 
-
 static size_t rtllib_rx_get_hdrlen(struct rtllib_device *ieee,
 				   struct sk_buff *skb,
 				   struct rtllib_rx_stats *rx_stats)
@@ -1569,7 +1565,6 @@ static int rtllib_verify_qos_info(struct rtllib_qos_information_element
 	return 0;
 }
 
-
 /* Parse a QoS parameter element */
 static int rtllib_read_qos_param_element(
 			struct rtllib_qos_parameter_info *element_param,
@@ -1599,7 +1594,6 @@ static int rtllib_read_qos_info_element(
 	return rtllib_verify_qos_info(element_info, QOS_OUI_INFO_SUB_TYPE);
 }
 
-
 /* Write QoS parameters from the ac parameters. */
 static int rtllib_qos_convert_ac_to_parameters(struct rtllib_qos_parameter_info *param_elm,
 					       struct rtllib_qos_data *qos_data)
@@ -1843,7 +1837,6 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
 		}
 	}
 
-
 	if (*tmp_htinfo_len == 0) {
 		if (info_element->len >= 4 &&
 		    info_element->data[0] == 0x00 &&
@@ -1932,7 +1925,6 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
 	    info_element->data[2] == 0x96)
 		network->cisco_cap_exist = true;
 
-
 	if (info_element->len >= 3 &&
 	    info_element->data[0] == 0x00 &&
 	    info_element->data[1] == 0x0a &&
@@ -2142,13 +2134,11 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
 
 			network->dtim_data = RTLLIB_DTIM_VALID;
 
-
 			if (info_element->data[2] & 1)
 				network->dtim_data |= RTLLIB_DTIM_MBCAST;
 
 			offset = (info_element->data[2] >> 1)*2;
 
-
 			if (ieee->assoc_id < 8*offset ||
 			    ieee->assoc_id > 8*(offset + info_element->len - 3))
 				break;
@@ -2203,7 +2193,6 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
 						 &tmp_htcap_len);
 			break;
 
-
 		case MFIE_TYPE_HT_INFO:
 			netdev_dbg(ieee->dev, "MFIE_TYPE_HT_INFO: %d bytes\n",
 				   info_element->len);
@@ -2392,7 +2381,6 @@ static inline int is_same_network(struct rtllib_network *src,
 		(dst->capability & WLAN_CAPABILITY_ESS)));
 }
 
-
 static inline void update_network(struct rtllib_device *ieee,
 				  struct rtllib_network *dst,
 				  struct rtllib_network *src)
@@ -2580,7 +2568,6 @@ static inline void rtllib_process_probe_response(
 		goto free_network;
 	}
 
-
 	if (!rtllib_legal_channel(ieee, network->channel))
 		goto free_network;
 
-- 
2.34.1


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

* [PATCH v2 2/4] staging: rtl8192e: add blank lines after declarations
  2023-03-23 19:19 [PATCH v2 0/4] staging: rtl8192e: code cleanup patches Khadija Kamran
  2023-03-23 19:19 ` [PATCH v2 1/4] staging: rtl8192e: remove extra blank lines Khadija Kamran
@ 2023-03-23 19:20 ` Khadija Kamran
  2023-03-23 19:20 ` [PATCH v2 3/4] staging: rtl8192e: add spaces around binary operators Khadija Kamran
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Khadija Kamran @ 2023-03-23 19:20 UTC (permalink / raw)
  To: outreachy; +Cc: gregkh, linux-staging, linux-kernel

Add blank lines after declarations as reported by checkpatch.pl

"CHECK: Please use a blank line after function/struct/union/enum
declarations"

Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
---
 drivers/staging/rtl8192e/rtllib_rx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index c6114d99829b..7144a0630ea6 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -231,10 +231,12 @@ rtllib_rx_frame_mgmt(struct rtllib_device *ieee, struct sk_buff *skb,
 static unsigned char rfc1042_header[] = {
 	0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
 };
+
 /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
 static unsigned char bridge_tunnel_header[] = {
 	0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8
 };
+
 /* No encapsulation header if EtherType < 0x600 (=length) */
 
 /* Called by rtllib_rx_frame_decrypt */
-- 
2.34.1


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

* [PATCH v2 3/4] staging: rtl8192e: add spaces around binary operators
  2023-03-23 19:19 [PATCH v2 0/4] staging: rtl8192e: code cleanup patches Khadija Kamran
  2023-03-23 19:19 ` [PATCH v2 1/4] staging: rtl8192e: remove extra blank lines Khadija Kamran
  2023-03-23 19:20 ` [PATCH v2 2/4] staging: rtl8192e: add blank lines after declarations Khadija Kamran
@ 2023-03-23 19:20 ` Khadija Kamran
  2023-03-23 19:20 ` [PATCH v2 4/4] staging: rtl8192e: remove blank lines after '{' Khadija Kamran
  2023-03-23 19:35 ` [PATCH v2 0/4] staging: rtl8192e: code cleanup patches Philipp Hortmann
  4 siblings, 0 replies; 8+ messages in thread
From: Khadija Kamran @ 2023-03-23 19:20 UTC (permalink / raw)
  To: outreachy; +Cc: gregkh, linux-staging, linux-kernel

Use spaces around binary operators as suggested by Linux kernel coding
style.
Issues reported by checkpatch.pl for the following binary operators:
	+ , - , * , | , <<

Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
---
 drivers/staging/rtl8192e/rtllib_rx.c | 54 ++++++++++++++--------------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 7144a0630ea6..f627dfe66d90 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -356,7 +356,7 @@ rtllib_rx_frame_decrypt_msdu(struct rtllib_device *ieee, struct sk_buff *skb,
 }
 
 /* this function is stolen from ipw2200 driver*/
-#define IEEE_PACKET_RETRY_TIME (5*HZ)
+#define IEEE_PACKET_RETRY_TIME (5 * HZ)
 static int is_duplicate_packet(struct rtllib_device *ieee,
 				      struct rtllib_hdr_4addr *header)
 {
@@ -936,7 +936,7 @@ static int rtllib_rx_check_duplicate(struct rtllib_device *ieee,
 
 		if (GetTs(ieee, (struct ts_common_info **)&pRxTS, hdr->addr2,
 			(u8)Frame_QoSTID((u8 *)(skb->data)), RX_DIR, true)) {
-			if ((fc & (1<<11)) && (frag == pRxTS->rx_last_frag_num) &&
+			if ((fc & (1 << 11)) && (frag == pRxTS->rx_last_frag_num) &&
 			    (WLAN_GET_SEQ_SEQ(sc) == pRxTS->rx_last_seq_num))
 				return -1;
 			pRxTS->rx_last_frag_num = frag;
@@ -1619,23 +1619,23 @@ static int rtllib_qos_convert_ac_to_parameters(struct rtllib_qos_parameter_info
 		case 1:
 			/* BIT(0) | BIT(3) */
 			if (acm)
-				qos_data->wmm_acm |= (0x01<<0)|(0x01<<3);
+				qos_data->wmm_acm |= (0x01 << 0) | (0x01 << 3);
 			break;
 		case 2:
 			/* BIT(4) | BIT(5) */
 			if (acm)
-				qos_data->wmm_acm |= (0x01<<4)|(0x01<<5);
+				qos_data->wmm_acm |= (0x01 << 4) | (0x01 << 5);
 			break;
 		case 3:
 			/* BIT(6) | BIT(7) */
 			if (acm)
-				qos_data->wmm_acm |= (0x01<<6)|(0x01<<7);
+				qos_data->wmm_acm |= (0x01 << 6) | (0x01 << 7);
 			break;
 		case 0:
 		default:
 			/* BIT(1) | BIT(2) */
 			if (acm)
-				qos_data->wmm_acm |= (0x01<<1)|(0x01<<2);
+				qos_data->wmm_acm |= (0x01 << 1) | (0x01 << 2);
 			break;
 		}
 
@@ -1979,7 +1979,7 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
 	    info_element->data[3] == 0x04) {
 		netdev_dbg(ieee->dev, "MFIE_TYPE_WZC: %d bytes\n",
 			   info_element->len);
-		network->wzc_ie_len = min(info_element->len+2, MAX_WZC_IE_LEN);
+		network->wzc_ie_len = min(info_element->len + 2, MAX_WZC_IE_LEN);
 		memcpy(network->wzc_ie, info_element, network->wzc_ie_len);
 	}
 }
@@ -2139,10 +2139,10 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
 			if (info_element->data[2] & 1)
 				network->dtim_data |= RTLLIB_DTIM_MBCAST;
 
-			offset = (info_element->data[2] >> 1)*2;
+			offset = (info_element->data[2] >> 1) * 2;
 
-			if (ieee->assoc_id < 8*offset ||
-			    ieee->assoc_id > 8*(offset + info_element->len - 3))
+			if (ieee->assoc_id < 8 * offset ||
+			    ieee->assoc_id > 8 * (offset + info_element->len - 3))
 				break;
 
 			offset = (ieee->assoc_id / 8) - offset;
@@ -2357,7 +2357,7 @@ static inline int rtllib_network_init(
 	if (rtllib_is_empty_essid(network->ssid, network->ssid_len))
 		network->flags |= NETWORK_EMPTY_ESSID;
 	stats->signal = 30 + (stats->SignalStrength * 70) / 100;
-	stats->noise = rtllib_translate_todbm((u8)(100-stats->signal)) - 25;
+	stats->noise = rtllib_translate_todbm((u8)(100 - stats->signal)) - 25;
 
 	memcpy(&network->stats, stats, sizeof(network->stats));
 
@@ -2545,22 +2545,22 @@ static inline void rtllib_process_probe_response(
 		   "'%s' ( %pM ): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n",
 		   escape_essid(info_element->data, info_element->len),
 		   beacon->header.addr3,
-		   (le16_to_cpu(beacon->capability) & (1<<0xf)) ? '1' : '0',
-		   (le16_to_cpu(beacon->capability) & (1<<0xe)) ? '1' : '0',
-		   (le16_to_cpu(beacon->capability) & (1<<0xd)) ? '1' : '0',
-		   (le16_to_cpu(beacon->capability) & (1<<0xc)) ? '1' : '0',
-		   (le16_to_cpu(beacon->capability) & (1<<0xb)) ? '1' : '0',
-		   (le16_to_cpu(beacon->capability) & (1<<0xa)) ? '1' : '0',
-		   (le16_to_cpu(beacon->capability) & (1<<0x9)) ? '1' : '0',
-		   (le16_to_cpu(beacon->capability) & (1<<0x8)) ? '1' : '0',
-		   (le16_to_cpu(beacon->capability) & (1<<0x7)) ? '1' : '0',
-		   (le16_to_cpu(beacon->capability) & (1<<0x6)) ? '1' : '0',
-		   (le16_to_cpu(beacon->capability) & (1<<0x5)) ? '1' : '0',
-		   (le16_to_cpu(beacon->capability) & (1<<0x4)) ? '1' : '0',
-		   (le16_to_cpu(beacon->capability) & (1<<0x3)) ? '1' : '0',
-		   (le16_to_cpu(beacon->capability) & (1<<0x2)) ? '1' : '0',
-		   (le16_to_cpu(beacon->capability) & (1<<0x1)) ? '1' : '0',
-		   (le16_to_cpu(beacon->capability) & (1<<0x0)) ? '1' : '0');
+		   (le16_to_cpu(beacon->capability) & (1 << 0xf)) ? '1' : '0',
+		   (le16_to_cpu(beacon->capability) & (1 << 0xe)) ? '1' : '0',
+		   (le16_to_cpu(beacon->capability) & (1 << 0xd)) ? '1' : '0',
+		   (le16_to_cpu(beacon->capability) & (1 << 0xc)) ? '1' : '0',
+		   (le16_to_cpu(beacon->capability) & (1 << 0xb)) ? '1' : '0',
+		   (le16_to_cpu(beacon->capability) & (1 << 0xa)) ? '1' : '0',
+		   (le16_to_cpu(beacon->capability) & (1 << 0x9)) ? '1' : '0',
+		   (le16_to_cpu(beacon->capability) & (1 << 0x8)) ? '1' : '0',
+		   (le16_to_cpu(beacon->capability) & (1 << 0x7)) ? '1' : '0',
+		   (le16_to_cpu(beacon->capability) & (1 << 0x6)) ? '1' : '0',
+		   (le16_to_cpu(beacon->capability) & (1 << 0x5)) ? '1' : '0',
+		   (le16_to_cpu(beacon->capability) & (1 << 0x4)) ? '1' : '0',
+		   (le16_to_cpu(beacon->capability) & (1 << 0x3)) ? '1' : '0',
+		   (le16_to_cpu(beacon->capability) & (1 << 0x2)) ? '1' : '0',
+		   (le16_to_cpu(beacon->capability) & (1 << 0x1)) ? '1' : '0',
+		   (le16_to_cpu(beacon->capability) & (1 << 0x0)) ? '1' : '0');
 
 	if (rtllib_network_init(ieee, beacon, network, stats)) {
 		netdev_dbg(ieee->dev, "Dropped '%s' ( %pM) via %s.\n",
-- 
2.34.1


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

* [PATCH v2 4/4] staging: rtl8192e: remove blank lines after '{'
  2023-03-23 19:19 [PATCH v2 0/4] staging: rtl8192e: code cleanup patches Khadija Kamran
                   ` (2 preceding siblings ...)
  2023-03-23 19:20 ` [PATCH v2 3/4] staging: rtl8192e: add spaces around binary operators Khadija Kamran
@ 2023-03-23 19:20 ` Khadija Kamran
  2023-03-23 19:35 ` [PATCH v2 0/4] staging: rtl8192e: code cleanup patches Philipp Hortmann
  4 siblings, 0 replies; 8+ messages in thread
From: Khadija Kamran @ 2023-03-23 19:20 UTC (permalink / raw)
  To: outreachy; +Cc: gregkh, linux-staging, linux-kernel

Remove unnecessary blank lines after an open brace as reported by
checkpatch.pl

"CHECK: Blank lines aren't necessary after an open brace '{'"

Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
---
 drivers/staging/rtl8192e/rtllib_rx.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index f627dfe66d90..b649d02dc5c8 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1167,7 +1167,6 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
 	if (crypt && !(fc & RTLLIB_FCTL_WEP) && !ieee->open_wep) {
 		if (/*ieee->ieee802_1x &&*/
 		    rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
-
 			/* pass unencrypted EAPOL frames even if encryption is
 			 * configured
 			 */
@@ -1207,7 +1206,6 @@ static void rtllib_rx_check_leave_lps(struct rtllib_device *ieee, u8 unicast,
 				      u8 nr_subframes)
 {
 	if (unicast) {
-
 		if (ieee->state == RTLLIB_LINKED) {
 			if (((ieee->link_detect_info.NumRxUnicastOkInPeriod +
 			    ieee->link_detect_info.NumTxOkInPeriod) > 8) ||
@@ -1552,7 +1550,6 @@ static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 };
 static int rtllib_verify_qos_info(struct rtllib_qos_information_element
 				     *info_element, int sub_type)
 {
-
 	if (info_element->elementID != QOS_ELEMENT_ID)
 		return -1;
 	if (info_element->qui_subtype != sub_type)
@@ -2696,7 +2693,6 @@ static void rtllib_rx_mgt(struct rtllib_device *ieee,
 		ieee->last_rx_ps_time = jiffies;
 
 	switch (WLAN_FC_GET_STYPE(le16_to_cpu(header->frame_ctl))) {
-
 	case RTLLIB_STYPE_BEACON:
 		netdev_dbg(ieee->dev, "received BEACON (%d)\n",
 			   WLAN_FC_GET_STYPE(le16_to_cpu(header->frame_ctl)));
-- 
2.34.1


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

* Re: [PATCH v2 0/4] staging: rtl8192e: code cleanup patches
  2023-03-23 19:19 [PATCH v2 0/4] staging: rtl8192e: code cleanup patches Khadija Kamran
                   ` (3 preceding siblings ...)
  2023-03-23 19:20 ` [PATCH v2 4/4] staging: rtl8192e: remove blank lines after '{' Khadija Kamran
@ 2023-03-23 19:35 ` Philipp Hortmann
  4 siblings, 0 replies; 8+ messages in thread
From: Philipp Hortmann @ 2023-03-23 19:35 UTC (permalink / raw)
  To: Khadija Kamran, outreachy; +Cc: gregkh, linux-staging, linux-kernel

On 3/23/23 20:19, Khadija Kamran wrote:
> Fix several cleanup issues reported by checkpatch.pl in module
> staging/rtl8192e in file rtllib_rx.c
> 
> Changes in v2:
>   - Resent patchset with the correct email address
> 
> Khadija Kamran (4):
>    staging: rtl8192e: remove extra blank lines
>    staging: rtl8192e: add blank lines after declarations
>    staging: rtl8192e: add spaces around binary operators
>    staging: rtl8192e: remove blank lines after '{'
> 
>   drivers/staging/rtl8192e/rtllib_rx.c | 73 +++++++++++-----------------
>   1 file changed, 29 insertions(+), 44 deletions(-)
> 

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>

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

* Re: [PATCH v2 1/4] staging: rtl8192e: remove extra blank lines
  2023-03-23 19:19 ` [PATCH v2 1/4] staging: rtl8192e: remove extra blank lines Khadija Kamran
@ 2023-03-24 15:41   ` Alison Schofield
  2023-03-24 22:11     ` Khadija Kamran
  0 siblings, 1 reply; 8+ messages in thread
From: Alison Schofield @ 2023-03-24 15:41 UTC (permalink / raw)
  To: Khadija Kamran; +Cc: outreachy, gregkh, linux-staging, linux-kernel

On Fri, Mar 24, 2023 at 12:19:59AM +0500, Khadija Kamran wrote:
> Remove extra blank lines as reported by checkpatch.pl
> 
> "CHECK: Please don't use multiple blank lines"

Commit log needs to say why you did it, why this patch need to be
merged. Checkpatch itself doesn't satisfy the why requirement.

When we do these white space cleanups, the why is typically
"to adhere to the Linux kernel coding-style."

If you are doing a particular checkpatch cleanup and are not
sure what to write, check your predecessors.

$ git log --oneline | grep "multiple blank lines"

That'll give you many instances. Reference a few, some poor ones
sneak through.

Alison

> 
> Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
> ---
>  drivers/staging/rtl8192e/rtllib_rx.c | 13 -------------
>  1 file changed, 13 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
> index c394c21beefb..c6114d99829b 100644
> --- a/drivers/staging/rtl8192e/rtllib_rx.c
> +++ b/drivers/staging/rtl8192e/rtllib_rx.c
> @@ -154,7 +154,6 @@ rtllib_frag_cache_get(struct rtllib_device *ieee,
>  	return skb;
>  }
>  
> -
>  /* Called only as a tasklet (software IRQ) */
>  static int rtllib_frag_cache_invalidate(struct rtllib_device *ieee,
>  					   struct rtllib_hdr_4addr *hdr)
> @@ -318,7 +317,6 @@ rtllib_rx_frame_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
>  	return res;
>  }
>  
> -
>  /* Called only as a tasklet (software IRQ), by rtllib_rx */
>  static inline int
>  rtllib_rx_frame_decrypt_msdu(struct rtllib_device *ieee, struct sk_buff *skb,
> @@ -355,7 +353,6 @@ rtllib_rx_frame_decrypt_msdu(struct rtllib_device *ieee, struct sk_buff *skb,
>  	return 0;
>  }
>  
> -
>  /* this function is stolen from ipw2200 driver*/
>  #define IEEE_PACKET_RETRY_TIME (5*HZ)
>  static int is_duplicate_packet(struct rtllib_device *ieee,
> @@ -887,7 +884,6 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
>  	return rxb->nr_subframes;
>  }
>  
> -
>  static size_t rtllib_rx_get_hdrlen(struct rtllib_device *ieee,
>  				   struct sk_buff *skb,
>  				   struct rtllib_rx_stats *rx_stats)
> @@ -1569,7 +1565,6 @@ static int rtllib_verify_qos_info(struct rtllib_qos_information_element
>  	return 0;
>  }
>  
> -
>  /* Parse a QoS parameter element */
>  static int rtllib_read_qos_param_element(
>  			struct rtllib_qos_parameter_info *element_param,
> @@ -1599,7 +1594,6 @@ static int rtllib_read_qos_info_element(
>  	return rtllib_verify_qos_info(element_info, QOS_OUI_INFO_SUB_TYPE);
>  }
>  
> -
>  /* Write QoS parameters from the ac parameters. */
>  static int rtllib_qos_convert_ac_to_parameters(struct rtllib_qos_parameter_info *param_elm,
>  					       struct rtllib_qos_data *qos_data)
> @@ -1843,7 +1837,6 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
>  		}
>  	}
>  
> -
>  	if (*tmp_htinfo_len == 0) {
>  		if (info_element->len >= 4 &&
>  		    info_element->data[0] == 0x00 &&
> @@ -1932,7 +1925,6 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
>  	    info_element->data[2] == 0x96)
>  		network->cisco_cap_exist = true;
>  
> -
>  	if (info_element->len >= 3 &&
>  	    info_element->data[0] == 0x00 &&
>  	    info_element->data[1] == 0x0a &&
> @@ -2142,13 +2134,11 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
>  
>  			network->dtim_data = RTLLIB_DTIM_VALID;
>  
> -
>  			if (info_element->data[2] & 1)
>  				network->dtim_data |= RTLLIB_DTIM_MBCAST;
>  
>  			offset = (info_element->data[2] >> 1)*2;
>  
> -
>  			if (ieee->assoc_id < 8*offset ||
>  			    ieee->assoc_id > 8*(offset + info_element->len - 3))
>  				break;
> @@ -2203,7 +2193,6 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
>  						 &tmp_htcap_len);
>  			break;
>  
> -
>  		case MFIE_TYPE_HT_INFO:
>  			netdev_dbg(ieee->dev, "MFIE_TYPE_HT_INFO: %d bytes\n",
>  				   info_element->len);
> @@ -2392,7 +2381,6 @@ static inline int is_same_network(struct rtllib_network *src,
>  		(dst->capability & WLAN_CAPABILITY_ESS)));
>  }
>  
> -
>  static inline void update_network(struct rtllib_device *ieee,
>  				  struct rtllib_network *dst,
>  				  struct rtllib_network *src)
> @@ -2580,7 +2568,6 @@ static inline void rtllib_process_probe_response(
>  		goto free_network;
>  	}
>  
> -
>  	if (!rtllib_legal_channel(ieee, network->channel))
>  		goto free_network;
>  
> -- 
> 2.34.1
> 
> 

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

* Re: [PATCH v2 1/4] staging: rtl8192e: remove extra blank lines
  2023-03-24 15:41   ` Alison Schofield
@ 2023-03-24 22:11     ` Khadija Kamran
  0 siblings, 0 replies; 8+ messages in thread
From: Khadija Kamran @ 2023-03-24 22:11 UTC (permalink / raw)
  To: Alison Schofield; +Cc: outreachy, gregkh, linux-staging, linux-kernel

On Fri, Mar 24, 2023 at 08:41:11AM -0700, Alison Schofield wrote:
> On Fri, Mar 24, 2023 at 12:19:59AM +0500, Khadija Kamran wrote:
> > Remove extra blank lines as reported by checkpatch.pl
> > 
> > "CHECK: Please don't use multiple blank lines"
> 
> Commit log needs to say why you did it, why this patch need to be
> merged. Checkpatch itself doesn't satisfy the why requirement.
> 
> When we do these white space cleanups, the why is typically
> "to adhere to the Linux kernel coding-style."
> 
> If you are doing a particular checkpatch cleanup and are not
> sure what to write, check your predecessors.
> 
> $ git log --oneline | grep "multiple blank lines"
>

Hey Alison,

I have resent the patchset with the advised changes.
Thank you!

Regards,
Khadija

> That'll give you many instances. Reference a few, some poor ones
> sneak through.
> 
> Alison
> 
> > 
> > Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
> > ---
> >  drivers/staging/rtl8192e/rtllib_rx.c | 13 -------------
> >  1 file changed, 13 deletions(-)
> > 
> > diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
> > index c394c21beefb..c6114d99829b 100644
> > --- a/drivers/staging/rtl8192e/rtllib_rx.c
> > +++ b/drivers/staging/rtl8192e/rtllib_rx.c
> > @@ -154,7 +154,6 @@ rtllib_frag_cache_get(struct rtllib_device *ieee,
> >  	return skb;
> >  }
> >  
> > -
> >  /* Called only as a tasklet (software IRQ) */
> >  static int rtllib_frag_cache_invalidate(struct rtllib_device *ieee,
> >  					   struct rtllib_hdr_4addr *hdr)
> > @@ -318,7 +317,6 @@ rtllib_rx_frame_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
> >  	return res;
> >  }
> >  
> > -
> >  /* Called only as a tasklet (software IRQ), by rtllib_rx */
> >  static inline int
> >  rtllib_rx_frame_decrypt_msdu(struct rtllib_device *ieee, struct sk_buff *skb,
> > @@ -355,7 +353,6 @@ rtllib_rx_frame_decrypt_msdu(struct rtllib_device *ieee, struct sk_buff *skb,
> >  	return 0;
> >  }
> >  
> > -
> >  /* this function is stolen from ipw2200 driver*/
> >  #define IEEE_PACKET_RETRY_TIME (5*HZ)
> >  static int is_duplicate_packet(struct rtllib_device *ieee,
> > @@ -887,7 +884,6 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
> >  	return rxb->nr_subframes;
> >  }
> >  
> > -
> >  static size_t rtllib_rx_get_hdrlen(struct rtllib_device *ieee,
> >  				   struct sk_buff *skb,
> >  				   struct rtllib_rx_stats *rx_stats)
> > @@ -1569,7 +1565,6 @@ static int rtllib_verify_qos_info(struct rtllib_qos_information_element
> >  	return 0;
> >  }
> >  
> > -
> >  /* Parse a QoS parameter element */
> >  static int rtllib_read_qos_param_element(
> >  			struct rtllib_qos_parameter_info *element_param,
> > @@ -1599,7 +1594,6 @@ static int rtllib_read_qos_info_element(
> >  	return rtllib_verify_qos_info(element_info, QOS_OUI_INFO_SUB_TYPE);
> >  }
> >  
> > -
> >  /* Write QoS parameters from the ac parameters. */
> >  static int rtllib_qos_convert_ac_to_parameters(struct rtllib_qos_parameter_info *param_elm,
> >  					       struct rtllib_qos_data *qos_data)
> > @@ -1843,7 +1837,6 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
> >  		}
> >  	}
> >  
> > -
> >  	if (*tmp_htinfo_len == 0) {
> >  		if (info_element->len >= 4 &&
> >  		    info_element->data[0] == 0x00 &&
> > @@ -1932,7 +1925,6 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
> >  	    info_element->data[2] == 0x96)
> >  		network->cisco_cap_exist = true;
> >  
> > -
> >  	if (info_element->len >= 3 &&
> >  	    info_element->data[0] == 0x00 &&
> >  	    info_element->data[1] == 0x0a &&
> > @@ -2142,13 +2134,11 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
> >  
> >  			network->dtim_data = RTLLIB_DTIM_VALID;
> >  
> > -
> >  			if (info_element->data[2] & 1)
> >  				network->dtim_data |= RTLLIB_DTIM_MBCAST;
> >  
> >  			offset = (info_element->data[2] >> 1)*2;
> >  
> > -
> >  			if (ieee->assoc_id < 8*offset ||
> >  			    ieee->assoc_id > 8*(offset + info_element->len - 3))
> >  				break;
> > @@ -2203,7 +2193,6 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
> >  						 &tmp_htcap_len);
> >  			break;
> >  
> > -
> >  		case MFIE_TYPE_HT_INFO:
> >  			netdev_dbg(ieee->dev, "MFIE_TYPE_HT_INFO: %d bytes\n",
> >  				   info_element->len);
> > @@ -2392,7 +2381,6 @@ static inline int is_same_network(struct rtllib_network *src,
> >  		(dst->capability & WLAN_CAPABILITY_ESS)));
> >  }
> >  
> > -
> >  static inline void update_network(struct rtllib_device *ieee,
> >  				  struct rtllib_network *dst,
> >  				  struct rtllib_network *src)
> > @@ -2580,7 +2568,6 @@ static inline void rtllib_process_probe_response(
> >  		goto free_network;
> >  	}
> >  
> > -
> >  	if (!rtllib_legal_channel(ieee, network->channel))
> >  		goto free_network;
> >  
> > -- 
> > 2.34.1
> > 
> > 

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

end of thread, other threads:[~2023-03-24 22:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 19:19 [PATCH v2 0/4] staging: rtl8192e: code cleanup patches Khadija Kamran
2023-03-23 19:19 ` [PATCH v2 1/4] staging: rtl8192e: remove extra blank lines Khadija Kamran
2023-03-24 15:41   ` Alison Schofield
2023-03-24 22:11     ` Khadija Kamran
2023-03-23 19:20 ` [PATCH v2 2/4] staging: rtl8192e: add blank lines after declarations Khadija Kamran
2023-03-23 19:20 ` [PATCH v2 3/4] staging: rtl8192e: add spaces around binary operators Khadija Kamran
2023-03-23 19:20 ` [PATCH v2 4/4] staging: rtl8192e: remove blank lines after '{' Khadija Kamran
2023-03-23 19:35 ` [PATCH v2 0/4] staging: rtl8192e: code cleanup patches Philipp Hortmann

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