From: Christoph Hellwig <hch@infradead.org>
To: Johannes Thumshirn <jthumshirn@suse.de>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
Linux SCSI Mailinglist <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH v2 3/3] scsi: don't add scsi command result bytes
Date: Wed, 13 Jun 2018 04:59:29 -0700 [thread overview]
Message-ID: <20180613115929.GC12438@infradead.org> (raw)
In-Reply-To: <20180613075349.7509-4-jthumshirn@suse.de>
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.
next prev parent reply other threads:[~2018-06-13 11:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-13 7:53 [PATCH v2 0/3] Preparation patch-set for SCSI results rework Johannes Thumshirn
2018-06-13 7:53 ` [PATCH v2 1/3] scsi: remove Scsi_Cmnd typedef Johannes Thumshirn
2018-06-13 11:57 ` Christoph Hellwig
2018-06-19 2:06 ` Martin K. Petersen
2018-06-13 7:53 ` [PATCH v2 2/3] scsi: check for equality of result byte values Johannes Thumshirn
2018-06-13 11:58 ` Christoph Hellwig
2018-06-13 13:09 ` Bart Van Assche
2018-06-13 7:53 ` [PATCH v2 3/3] scsi: don't add scsi command result bytes Johannes Thumshirn
2018-06-13 11:59 ` Christoph Hellwig [this message]
2018-06-13 13:11 ` Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180613115929.GC12438@infradead.org \
--to=hch@infradead.org \
--cc=jthumshirn@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox