Re: [PATCH 2/2] drivers/s390/cio/chsc_sch.c: Correct use of ! and &

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 04, 2008 at 10:05:47PM +0200, Julia Lawall wrote:
> From: Julia Lawall <julia@xxxxxxx>
> 
> 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).
> [...]
> -	if (!scsw_stctl(&request->irb.scsw) & SCSW_STCTL_STATUS_PEND)
> +	if (!(scsw_stctl(&request->irb.scsw) & SCSW_STCTL_STATUS_PEND))
>  		return -EIO;
>  	backed_up = scsw_cstat(&request->irb.scsw) & SCHN_STAT_CHAIN_CHECK;
>  	request->irb.scsw.cmd.cstat &= ~SCHN_STAT_CHAIN_CHECK;

Nice finding. Thank you!
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux