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.