Skip to contentSkip to conversation

net: wireless: brcmsmac: Remove unnecessary parentheses

PATCH In review Varsha Rao 2 participants 2 messages Jun 1, 2018 – Jun 27, 2018

Subsystems (3)
lore
Share & tools
lore

Varsha Rao

author
#0 lore raw

PATCH 1/1 net: wireless: brcmsmac: Remove unnecessary parentheses

This patch fixes the clang warning of extraneous parentheses, with the following coccinelle script.

@@
identifier i;
expression e;
statement s;
@@
if (
-(i == e)
+i == e
)
s

---
 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c +1 -1
index 3a13d176b221..35e3b101e5cf 100644
@@ -159,7 +159,7 @@ u16 read_radio_reg(struct brcms_phy *pi, u16 addr)
 {
 	u16 data;
 
-	if ((addr == RADIO_IDCODE))
+	if (addr == RADIO_IDCODE)
 		return 0xffff;
 
 	switch (pi->pubpi.phy_type) {
Signature · 1 line
2.17.0
#1 lore raw

Re: brcmsmac: Remove unnecessary parentheses

Quoted 14 lines · Varsha Rao

This patch fixes the clang warning of extraneous parentheses, with the following coccinelle script.

@@
identifier i;
expression e;
statement s;
@@
if (

(quoted diff) +1 -1
-(i == e)
+i == e
 )

s

Quoted 2 lines

Patch applied to wireless-drivers-next.git, thanks.

eb5d2f3afc0f brcmsmac: Remove unnecessary parentheses

Signature · 3 lines
https://patchwork.kernel.org/patch/10442401/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches