nvme: host: changing data type for variable from bool to int.
A message that is not in the archive (sent off-list or not yet received): CGME20230912092353epcas5p130b50fa2030574071c41461447fddd52@epcas5p1.samsung.com
PATCH 1/1 nvme: host: changing data type for variable from bool to int.
From: Ankit Soni <[email protected]>
Changing data type of local variable to make it aligned with return type of "nvme_poll_cq" function.
--- drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/pci.c +1 -1
@@ -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;if (!nvme_cqe_pending (nvmeq))return 0 ;
Signature · 1 line
1.8.3.1
Quoted 16 lines · On Tue, Sep 12, 2023 at 09:25:11AM +0530, [email protected] wrote:
From: Ankit Soni <[email protected]>
Changing data type of local variable to make it aligned with return type of "
nvme_poll_cq" function.Signed-off-by Ankit Soni <[email protected]>Signed-off-by Sathyavathi M <[email protected]>---
drivers/nvme/host/pci.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/nvme/host/pci.c +0
-0
drivers/nvme/host/pci.c static void nvme_poll_irqdisable(struct nvme_queue *nvmeq) · line 1119
Quoted 5 lines
drivers/nvme/host/pci.c +1
-1@@ -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.