[PATCH] pinctrl: aspeed: Add parentheses to HW_STRAP test

Andrew Jeffery andrew at aj.id.au
Fri Nov 18 18:06:35 AEDT 2016


Squashes a warning:

drivers/pinctrl/aspeed/pinctrl-aspeed.c: In function ‘aspeed_sig_expr_set’:
drivers/pinctrl/aspeed/pinctrl-aspeed.c:210:24: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
    offset == HW_STRAP1 && !(desc->mask & SPI1_REG_MASK)))
    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Andrew Jeffery <andrew at aj.id.au>
---
 drivers/pinctrl/aspeed/pinctrl-aspeed.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed.c b/drivers/pinctrl/aspeed/pinctrl-aspeed.c
index ce1399dd8b68..387b75aebc25 100644
--- a/drivers/pinctrl/aspeed/pinctrl-aspeed.c
+++ b/drivers/pinctrl/aspeed/pinctrl-aspeed.c
@@ -207,7 +207,7 @@ static bool aspeed_sig_expr_set(const struct aspeed_sig_expr *expr,
 		 * all descriptor bits.
 		 */
 		if (is_scu && (offset == HW_STRAP2 ||
-			offset == HW_STRAP1 && !(desc->mask & SPI1_REG_MASK)))
+			(offset == HW_STRAP1 && !(desc->mask & SPI1_REG_MASK))))
 			continue;
 
 		/*
-- 
2.9.3



More information about the openbmc mailing list