Re: [PATCH v4 3/7] scsi_io_completion_nz_result function added

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

 



On Wed, 2018-03-28 at 12:45 -0400, Douglas Gilbert wrote:
> +	if (sense_valid && (sshdr.sense_key == RECOVERED_ERROR)) {
> +		bool do_print = true;
> +		/*
> +		 * if ATA PASS-THROUGH INFORMATION AVAILABLE [0x0, 0x1d]
> +		 * skip print since caller wants ATA registers. Only occurs
> +		 * on SCSI ATA PASS_THROUGH commands when CK_COND=1
> +		 */
> +		if ((sshdr.asc == 0x0) && (sshdr.ascq == 0x1d))
> +			do_print = false;
> +		else if (req->rq_flags & RQF_QUIET)
> +			do_print = false;
> +		if (do_print)
> +			scsi_print_sense(cmd);
> +		/* for passthrough, *blk_statp may be set, so clear */
> +		*blk_statp = BLK_STS_OK;
> +		result = 0;
> +	}
> [ ... ]
> -	if (sense_valid && (sshdr.sense_key == RECOVERED_ERROR)) {
> -		/* if ATA PASS-THROUGH INFORMATION AVAILABLE skip
> -		 * print since caller wants ATA registers. Only occurs on
> -		 * SCSI ATA PASS_THROUGH commands when CK_COND=1
> -		 */
> -		if ((sshdr.asc == 0x0) && (sshdr.ascq == 0x1d))
> -			;
> -		else if (!(req->rq_flags & RQF_QUIET))
> -			scsi_print_sense(cmd);
> -		result = 0;
> -		/* for passthrough, blk_stat may be set */
> -		blk_stat = BLK_STS_OK;
> -	}

In the new code there is a 'do_print' variable but there is no such variable
in the original code. Please separate code movement from other code changes.
Separating code movement from other code changes is important not only because
it makes reviewing easier but is also important for people who run a bisect.

Thanks,

Bart.







[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