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;



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]