[PATCH] pinctrl: aspeed: Add parentheses to HW_STRAP test
Joel Stanley
joel at jms.id.au
Tue Nov 22 17:11:01 AEDT 2016
On Fri, Nov 18, 2016 at 5:36 PM, Andrew Jeffery <andrew at aj.id.au> wrote:
> 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>
Reviewed-by: Joel Stanley <joel at jms.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