Skip to contentSkip to conversation

staging: rtl8192u: ieee80211: Remove unnecessary braces.

PATCH In review Vatsala Narang 2 participants 3 messages Mar 24, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8192u: ieee80211: Remove unnecessary braces.

Remove braces around single statement block to get rid of checkpatch warning.

---
 drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +3 -8
index 6009fe0e1d4f..f0e6b72eb054 100644
@@ -853,14 +853,10 @@ static u8 parse_subframe(struct sk_buff *skb,
 
 			if (skb->len != 0) {
 				nPadding_Length = 4 - ((nSubframe_Length + ETHERNET_HEADER_SIZE) % 4);
-				if (nPadding_Length == 4) {
+				if (nPadding_Length == 4) 
 					nPadding_Length = 0;
-				}
-
-				if (skb->len < nPadding_Length) {
+				if (skb->len < nPadding_Length) 
 					return 0;
-				}
-
 				skb_pull(skb, nPadding_Length);
 			}
 		}
@@ -1313,9 +1309,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 
 				stats->rx_packets++;
 				stats->rx_bytes += sub_skb->len;
-				if (is_multicast_ether_addr(dst)) {
+				if (is_multicast_ether_addr(dst)) 
 					stats->multicast++;
-				}
 
 				/* Indicat the packets to upper layer */
 				sub_skb->protocol = eth_type_trans(sub_skb, dev);
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 29 lines · Vatsala Narang

Remove braces around single statement block to get rid of checkpatch warning.

---
 drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +2 -6
index 6009fe0e1d4f..f0e6b72eb054 100644
@@ -853,14 +853,10 @@ static u8 parse_subframe(struct sk_buff *skb,
 
 			if (skb->len != 0) {
 				nPadding_Length = 4 - ((nSubframe_Length + ETHERNET_HEADER_SIZE) % 4);
-				if (nPadding_Length == 4) {
+				if (nPadding_Length == 4) 
 					nPadding_Length = 0;
-				}
-
-				if (skb->len < nPadding_Length) {
+				if (skb->len < nPadding_Length) 
 					return 0;
-				}
-
 				skb_pull(skb, nPadding_Length);
 			}
 		}

drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, · line 1318

Quoted 7 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +1 -2
@@ -1313,9 +1309,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 
 				stats->rx_packets++;
 				stats->rx_bytes += sub_skb->len;
-				if (is_multicast_ether_addr(dst)) {
+				if (is_multicast_ether_addr(dst)) 
 					stats->multicast++;
-				}

ALWAYS run your patches through checkpatch.pl so you do not add new errors to the file, like you did here :(

greg k-h

#2 lore raw
Quoted 11 lines

- if (is_multicast_ether_addr(dst)) {

drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, · line 1318

Quoted 3 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +1 -1
+                                if (is_multicast_ether_addr(dst)) 
                                         stats->multicast++; 
-                                } 

ALWAYS run your patches through checkpatch.pl so you do not add new errors to the file, like you did here :(

greg k-h

okay i will verify it again and send it correctly
thanks,
Vatsala