Skip to contentSkip to conversation

staging: wilc1000: rearrange line exceeding 80 characters

PATCH In review Gokce Kuler 2 participants 2 messages Mar 16, 2020 – Mar 17, 2020 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: wilc1000: rearrange line exceeding 80 characters

Moved to the bottom line after && operator for it exceeds 80 character

---
 drivers/staging/wilc1000/netdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/wilc1000/netdev.c +4 -2
index a61c1a7..f94a17b 100644
@@ -794,8 +794,10 @@ void wilc_wfi_mgmt_rx(struct wilc *wilc, u8 *buff, u32 size)
 		u16 type = le16_to_cpup((__le16 *)buff);
 
 		if (vif->priv.p2p_listen_state &&
-		    ((type == vif->frame_reg[0].type && vif->frame_reg[0].reg) ||
-		     (type == vif->frame_reg[1].type && vif->frame_reg[1].reg)))
+		    ((type == vif->frame_reg[0].type &&
+		      vif->frame_reg[0].reg) ||
+		     (type == vif->frame_reg[1].type &&
+		      vif->frame_reg[1].reg)))
 			wilc_wfi_p2p_rx(vif, buff, size);
 
 		if (vif->monitor_flag)
Signature · 1 line
2.7.4
#1 lore raw
Quoted 12 lines · On Mon, 16 Mar 2020 18:10:09 +0300 Gokce Kuler <[email protected]> wrote:

Moved to the bottom line after && operator for it exceeds 80 character

---
 drivers/staging/wilc1000/netdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/wilc1000/netdev.c +0 -0
index a61c1a7..f94a17b 100644

drivers/staging/wilc1000/netdev.c void wilc_wfi_mgmt_rx(struct wilc *wilc, u8 *buff, u32 size) · line 801

Quoted 10 lines
drivers/staging/wilc1000/netdev.c +4 -2
@@ -794,8 +794,10 @@ void wilc_wfi_mgmt_rx(struct wilc *wilc, u8 *buff, u32 size)
 		u16 type = le16_to_cpup((__le16 *)buff);
 
 		if (vif->priv.p2p_listen_state &&
-		    ((type == vif->frame_reg[0].type && vif->frame_reg[0].reg) ||
-		     (type == vif->frame_reg[1].type && vif->frame_reg[1].reg)))
+		    ((type == vif->frame_reg[0].type &&
+		      vif->frame_reg[0].reg) ||
+		     (type == vif->frame_reg[1].type &&
+		      vif->frame_reg[1].reg)))
 			wilc_wfi_p2p_rx(vif, buff, size);

Strictly speaking, your change is correct and this way the code complies to the coding style.

Still, I tried to read the "fixed" version first, and it took me a while to "vertically" track all those parentheses. Can you find a better way to fix this?

Signature · 1 line
Stefano