Re: [PATCH 1/3] scsi: Cleanup scsi_noretry_cmd()

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

 



On 2020/09/11 2:48, Bart Van Assche wrote:
> On 2020-09-10 00:39, Damien Le Moal wrote:
>> No need for else after return.
>>
>> Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx>
>> ---
>>  drivers/scsi/scsi_error.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
>> index 927b1e641842..5f3726abed78 100644
>> --- a/drivers/scsi/scsi_error.c
>> +++ b/drivers/scsi/scsi_error.c
>> @@ -1755,8 +1755,8 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd)
>>  	if (scmd->request->cmd_flags & REQ_FAILFAST_DEV ||
>>  	    blk_rq_is_passthrough(scmd->request))
>>  		return 1;
>> -	else
>> -		return 0;
>> +
>> +	return 0;
>>  }
> 
> Is this patch useful? Is it necessary? Or is it just code churn?

Sure, you may consider it code churn, but I prefer the more positive view that
it improves code style. And looking at it again, I think the proper change
should actually be:

	return scmd->request->cmd_flags & REQ_FAILFAST_DEV ||
		blk_rq_is_passthrough(scmd->request);

A lot cleaner.

But no strong feelings. If you really do not like the change, I will drop it.

Best regards.


-- 
Damien Le Moal
Western Digital Research




[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