All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <Niklas.Cassel@wdc.com>
To: Kanchan Joshi <joshi.k@samsung.com>
Cc: "hch@lst.de" <hch@lst.de>,
	"kbusch@kernel.org" <kbusch@kernel.org>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"sagi@grimberg.me" <sagi@grimberg.me>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"joshiiitr@gmail.com" <joshiiitr@gmail.com>,
	Anuj Gupta <anuj20.g@samsung.com>
Subject: Re: [PATCH] nvme: fix error-handling for io_uring nvme-passthrough
Date: Wed, 18 Oct 2023 18:05:30 +0000	[thread overview]
Message-ID: <ZTAeaY6V5DgaiNI0@x1-carbon> (raw)
In-Reply-To: <20231018135718.28820-1-joshi.k@samsung.com>

Hello Kanchan,

On Wed, Oct 18, 2023 at 07:27:18PM +0530, Kanchan Joshi wrote:
> From: Anuj Gupta <anuj20.g@samsung.com>
> 
> Driver may return an error before submitting the command to the device.
> Ensure that such error is propagated up.
> 
> Fixes: 456cba386e94 ("nvme: wire-up uring-cmd support for io-passthru on char-device.")
>

Why do you have an empty line between the Fixes and the Signed-off-by ?
(I noticed this on some of your other patches as well.)

I don't think there is supposed to be any empty lines between the tags.

> Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
> Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
> ---
>  drivers/nvme/host/ioctl.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/host/ioctl.c b/drivers/nvme/host/ioctl.c
> index d8ff796fd5f2..53987df6ea7c 100644
> --- a/drivers/nvme/host/ioctl.c
> +++ b/drivers/nvme/host/ioctl.c
> @@ -508,8 +508,11 @@ static enum rq_end_io_ret nvme_uring_cmd_end_io(struct request *req,
>  	req->bio = pdu->bio;
>  	if (nvme_req(req)->flags & NVME_REQ_CANCELLED)
>  		pdu->nvme_status = -EINTR;
> -	else
> +	else {
>  		pdu->nvme_status = nvme_req(req)->status;
> +		if (!pdu->nvme_status)
> +			pdu->nvme_status = blk_status_to_errno(err);
> +	}

The kernel coding standard says that you should have braces on the if,
even if it is a single line statement, when you have brances on the else:
https://www.kernel.org/doc/html/latest/process/coding-style.html#placing-braces-and-spaces


Kind regards,
Niklas

      parent reply	other threads:[~2023-10-18 18:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20231018140334epcas5p128c55c56fb9203a19479cbf86175a1d6@epcas5p1.samsung.com>
2023-10-18 13:57 ` [PATCH] nvme: fix error-handling for io_uring nvme-passthrough Kanchan Joshi
2023-10-18 15:50   ` Christoph Hellwig
2023-10-18 16:50     ` Kanchan Joshi
2023-10-18 16:59       ` Keith Busch
2023-10-18 18:05   ` Niklas Cassel [this message]

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=ZTAeaY6V5DgaiNI0@x1-carbon \
    --to=niklas.cassel@wdc.com \
    --cc=anuj20.g@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=joshi.k@samsung.com \
    --cc=joshiiitr@gmail.com \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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.