aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2009-02-04 16:17:29 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-03-12 13:58:13 -0400
commitaa6cd29b72a5d8e6e5c8f536bc48693824ebfe09 (patch)
tree78b7a67a5f44d0cd12e993471fc0c403819b296d /drivers
parentf290f1970f01287eaaffc798a677594a57ebd65e (diff)
[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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/libfc/fc_exch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index 505825b6124d..8a0c5c239e9c 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -281,7 +281,7 @@ static void fc_exch_release(struct fc_exch *ep)
281 ep->destructor(&ep->seq, ep->arg); 281 ep->destructor(&ep->seq, ep->arg);
282 if (ep->lp->tt.exch_put) 282 if (ep->lp->tt.exch_put)
283 ep->lp->tt.exch_put(ep->lp, mp, ep->xid); 283 ep->lp->tt.exch_put(ep->lp, mp, ep->xid);
284 WARN_ON(!ep->esb_stat & ESB_ST_COMPLETE); 284 WARN_ON(!(ep->esb_stat & ESB_ST_COMPLETE));
285 mempool_free(ep, mp->ep_pool); 285 mempool_free(ep, mp->ep_pool);
286 } 286 }
287} 287}