Skip to contentSkip to conversation

nvme: host: changing data type for variable from bool to int.

PATCH In review [email protected] 3 participants 3 messages Sep 12, 2023 – Sep 13, 2023 1 message not in the archive NVMe

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20230912092353epcas5p130b50fa2030574071c41461447fddd52@epcas5p1.samsung.com

#1 lore raw

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
index 2f57da12..b328a65 100644
@@ -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
Reviewed-by on v1 1/1
#3 lore raw
In reply to [email protected]
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.

---
drivers/nvme/host/pci.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/pci.c +0 -0
index 2f57da12..b328a65 100644

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.