Re: [PATCH v2] Fix DID_OK handling in __scsi_error_from_host_byte()

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

 



On Wed, Apr 04, 2018 at 10:53:55AM -0700, Bart Van Assche wrote:
> +		/*
> +		 * Also check the other bytes than the status byte in result
> +		 * to handle the case when a SCSI LLD sets result to
> +		 * DRIVER_SENSE << 24 without setting SAM_STAT_CHECK_CONDITION.
> +		 */
> +		return scsi_status_is_good(result) && (result & ~0xff) == 0 ?
> +			BLK_STS_OK : BLK_STS_IOERR;

How about an readable version of the statement above?

		if (scsi_status_is_good(result) && (result & ~0xff))
			return BLK_STS_OK;
		return BLK_STS_IOERR;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux