[SCSI] libfc: Correct use of ! and &
authorJulia Lawall <julia@diku.dk>
Wed, 4 Feb 2009 21:17:29 +0000 (22:17 +0100)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Thu, 12 Mar 2009 17:58:13 +0000 (12:58 -0500)
commitaa6cd29b72a5d8e6e5c8f536bc48693824ebfe09
tree78b7a67a5f44d0cd12e993471fc0c403819b296d
parentf290f1970f01287eaaffc798a677594a57ebd65e
[SCSI] libfc: Correct use of ! and &

!ep->esb_stat is either 1 or 0, and the rightmost bit of ESB_ST_COMPLETE is
always 0, making the result of !ep->esb_stat & ESB_ST_COMPLETE always 0.
Thus parentheses around the argument to ! seem needed.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@ expression E; constant C; @@
(
  !E & !C
|
- !E & C
+ !(E & C)
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/libfc/fc_exch.c