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 Thu, Apr 05, 2018 at 08:43:18AM +0200, Hannes Reinecke wrote:
> And a further nit-pick: the function is called
> __scsi_error_from_host_byte(), so it's only logical that it would only
> check the host_byte().
> What's wrong is the _usage_ here; after calling
> __scsi_error_from_host_byte() we need to check if the _other_ bits of
> the results are non-zero to end up with a valid result.
> 
> Hence I would advocate to either rename this function
> (__scsi_error_from_result() ?) or evaluate the remaining bits outside
> this function.
> 
> But I would advocate for the former; otherwise the same issue will crop
> up again in the future.

Please also drop the pointless double underscore prefix while at it,
otherwise fully agreed.



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