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

Andrew Jeffery andrew at aj.id.au
Tue Nov 22 17:09:50 AEDT 2016


ping, for all the important things :D

On Fri, 2016-11-18 at 17:36 +1030, Andrew Jeffery 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>
> ---
>  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;
>  
> >  		/*
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20161122/7dbb676c/attachment.sig>


More information about the openbmc mailing list