[PATCH 1/1] nvme: host: changing data type for variable from bool to int.

Kanchan Joshi joshi.k at samsung.com
Wed Sep 13 08:30:42 PDT 2023


On Tue, Sep 12, 2023 at 09:25:11AM +0530, soni.ankit at samsung.com wrote:
>From: Ankit Soni <soni.ankit at samsung.com>
>
>Changing data type of  local variable to make it aligned with
>return type of "nvme_poll_cq" function.
>
>Signed-off-by: Ankit Soni <soni.ankit at samsung.com>
>Signed-off-by: Sathyavathi M <sathya.m at samsung.com>
>---
> drivers/nvme/host/pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
>index 2f57da12..b328a65 100644
>--- a/drivers/nvme/host/pci.c
>+++ b/drivers/nvme/host/pci.c
>@@ -1116,7 +1116,7 @@ static void nvme_poll_irqdisable(struct nvme_queue *nvmeq)
> static int nvme_poll(struct blk_mq_hw_ctx *hctx, struct io_comp_batch *iob)
> {
> 	struct nvme_queue *nvmeq = hctx->driver_data;
>-	bool found;
>+	int found;

Before this change, the function used to return 1 even if more
completions were reaped underneath.

Not a functional issue, as only place actual count mattered was in
io_uring, but it did not rely on this return anyway and used
completion-batching to process multiple completions.

But this was bit confusing, so good to have this cleaned up.

Reviewed-by: Kanchan Joshi <joshi.k at samsung.com>



More information about the Linux-nvme mailing list