2018-06-01 02:15:17

by Varsha Rao

[permalink] [raw]
Subject: [PATCH] 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

Suggested-by: Lukas Bulwahn <[email protected]>
Signed-off-by: Varsha Rao <[email protected]>
---
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c
index 3a13d176b221..35e3b101e5cf 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c
@@ -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) {
--
2.17.0



2018-06-27 15:57:00

by Kalle Valo

[permalink] [raw]
Subject: Re: brcmsmac: Remove unnecessary parentheses

Varsha Rao <[email protected]> wrote:

> 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
>
> Suggested-by: Lukas Bulwahn <[email protected]>
> Signed-off-by: Varsha Rao <[email protected]>

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

eb5d2f3afc0f brcmsmac: Remove unnecessary parentheses

--
https://patchwork.kernel.org/patch/10442401/

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