aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2008-10-10 15:33:16 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-10-10 15:33:54 -0400
commitb2bbb642ac2829006a81ae164e2f06ebc22f81dd (patch)
treec76cca05a39a1525f6e7978ac338d410ffdbd54f /drivers/s390/cio
parentf9c9fe3ecfc0c5ff17728d0c5ee95a4e269ec190 (diff)
[S390] cio: Correct use of ! and &
In commit e6bafba5b4765a5a252f1b8d31cbf6d2459da337, 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. In particular, the result of !scsw_stctl(&request->irb.scsw) & SCSW_STCTL_STATUS_PEND is always just !scsw_stctl(&request->irb.scsw). 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: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r--drivers/s390/cio/chsc_sch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/cio/chsc_sch.c b/drivers/s390/cio/chsc_sch.c
index 91ca87aa9f97..f49f0e502b8d 100644
--- a/drivers/s390/cio/chsc_sch.c
+++ b/drivers/s390/cio/chsc_sch.c
@@ -261,7 +261,7 @@ static int chsc_examine_irb(struct chsc_request *request)
261{ 261{
262 int backed_up; 262 int backed_up;
263 263
264 if (!scsw_stctl(&request->irb.scsw) & SCSW_STCTL_STATUS_PEND) 264 if (!(scsw_stctl(&request->irb.scsw) & SCSW_STCTL_STATUS_PEND))
265 return -EIO; 265 return -EIO;
266 backed_up = scsw_cstat(&request->irb.scsw) & SCHN_STAT_CHAIN_CHECK; 266 backed_up = scsw_cstat(&request->irb.scsw) & SCHN_STAT_CHAIN_CHECK;
267 request->irb.scsw.cmd.cstat &= ~SCHN_STAT_CHAIN_CHECK; 267 request->irb.scsw.cmd.cstat &= ~SCHN_STAT_CHAIN_CHECK;