[PATCH] drivers: CCI: Correct use of ! and &

Olof Johansson olof at lixom.net
Wed Jul 30 12:54:24 PDT 2014


On Wed, Jul 30, 2014 at 11:37:35AM +0100, Punit Agrawal wrote:
> From: Himangi Saraogi <himangi774 at gmail.com>
> 
> In commit ae91d60ba88ef0bdb1b5e9b2363bd52fc45d2af7, a bug was fixed that
> involved converting !x & y to !(x & y).  The code below shows the same
> pattern, and thus should perhaps be fixed in the same way.
> 
> The Coccinelle semantic patch that makes this change is as follows:
> 
> // <smpl>
> @@ expression E1,E2; @@
> (
>   !E1 & !E2
> |
> - !E1 & E2
> + !(E1 & E2)
> )
> // </smpl>
> 
> Cc: stable at vger.kernel.org
> Signed-off-by: Himangi Saraogi <himangi774 at gmail.com>
> Acked-by: Julia Lawall <julia.lawall at lip6.fr>
> Acked-by: Punit Agrawal <punit.agrawal at arm.com>
> ---

Thanks, applied (adding a Fixes: tag, please use those in the future)


-Olof



More information about the linux-arm-kernel mailing list