From: axboe@fb.com (Jens Axboe)
Subject: [PATCH] nvme: use an integer value to Linux errno values
Date: Thu, 15 Oct 2015 09:51:35 -0600 [thread overview]
Message-ID: <561FCB87.6090006@fb.com> (raw)
In-Reply-To: <20151015153032.GA2156@infradead.org>
On 10/15/2015 09:30 AM, Christoph Hellwig wrote:
> On Thu, Oct 15, 2015@03:13:23PM +0000, Keith Busch wrote:
>> On Thu, 15 Oct 2015, Christoph Hellwig wrote:
>>> On Mon, Oct 12, 2015@09:23:39PM +0200, Christoph Hellwig wrote:
>>>> drivers/nvme/host/pci.c | 12 +++++++-----
>>>> 1 file changed, 7 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
>>>> index a526696..9049888 100644
>>>> --- a/drivers/nvme/host/pci.c
>>>> +++ b/drivers/nvme/host/pci.c
>>>> @@ -606,8 +606,8 @@ static void req_completion(struct nvme_queue *nvmeq, void *ctx,
>>>> struct nvme_iod *iod = ctx;
>>>> struct request *req = iod_get_private(iod);
>>>> struct nvme_cmd_info *cmd_rq = blk_mq_rq_to_pdu(req);
>>>> -
>>>> u16 status = le16_to_cpup(&cqe->status) >> 1;
>>>> + int error;
>>
>> My compiler didn't warn, so maybe I'm missing something, but this looks
>> like this needs to initialize error to 0, right? It's setting error only
>> in the non-zero status case, but used in both cases.
>
> Yes, it should be set to zero. That's what I did in the tested version
> because this one will actually blow up.
Good catch Keith, I've fixed it up.
--
Jens Axboe
next prev parent reply other threads:[~2015-10-15 15:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-12 19:23 [PATCH] nvme: use an integer value to Linux errno values Christoph Hellwig
2015-10-15 14:57 ` Christoph Hellwig
2015-10-15 15:13 ` Keith Busch
2015-10-15 15:30 ` Christoph Hellwig
2015-10-15 15:51 ` Jens Axboe [this message]
2015-10-15 15:04 ` Jens Axboe
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=561FCB87.6090006@fb.com \
--to=axboe@fb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.