lkml.org 
[lkml]   [2018]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/3] scsi: don't add scsi command result bytes
On Wed, Jun 13, 2018 at 09:53:49AM +0200, Johannes Thumshirn wrote:
> Some drivers are ADDing the scsi command's result bytes instead of
> ORing them.
>
> While this can produce correct results it has unexpected side effects.
>
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

> - cmd->result = (DID_OK << 16) + (l & STATUS_MASK);
> + cmd->result = DID_OK << 16 | (l & STATUS_MASK);

Although I would have keep the braces around the shift operators
to stick closer to the original code. But the code should be fine
even without them.

\
 
 \ /
  Last update: 2018-06-13 13:59    [W:0.766 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site