]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/fsl-pci: Correct use of ! and &
authorHimangi Saraogi <himangi774@gmail.com>
Sat, 19 Jul 2014 21:49:59 +0000 (03:19 +0530)
committerScott Wood <scottwood@freescale.com>
Wed, 30 Jul 2014 00:26:31 +0000 (19:26 -0500)
commita5af7cee11550c4a6d20c584ee60e3110033691a
tree6a05787668c8976abb617faad5aed19d008d25a4
parentb893d280e2d9d1141fbe9a124ac1941cff1fd415
powerpc/fsl-pci: Correct use of ! and &

In commit 68cf82f080aff319aef6a64572a7f1cf74cbaac4, 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.

This is not tested and clearly changes the semantics, so it is only
something to consider.

The Coccinelle semantic patch that makes this change is as follows:

// <smpl>
@@ expression E1,E2; @@
(
  !E1 & !E2
|
- !E1 & E2
+ !(E1 & E2)
)
// </smpl>

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
arch/powerpc/sysdev/fsl_pci.c