Skip to content

Commit 002bb02

Browse files
yongsoojookeithbusch
authored andcommitted
nvme: change return type of nvme_poll_cq() to bool
The nvme_poll_cq() function currently returns the number of CQEs found, However, only one caller, nvme_poll(), requires a boolean value to check whether any CQE was completed. The other callers do not use the return value at all. To better reflect its usage, update the return type of nvme_poll_cq() from int to bool. Signed-off-by: Yongsoo Joo <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent ac32057 commit 002bb02

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/nvme/host/pci.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,13 +1147,13 @@ static inline void nvme_update_cq_head(struct nvme_queue *nvmeq)
11471147
}
11481148
}
11491149

1150-
static inline int nvme_poll_cq(struct nvme_queue *nvmeq,
1151-
struct io_comp_batch *iob)
1150+
static inline bool nvme_poll_cq(struct nvme_queue *nvmeq,
1151+
struct io_comp_batch *iob)
11521152
{
1153-
int found = 0;
1153+
bool found = false;
11541154

11551155
while (nvme_cqe_pending(nvmeq)) {
1156-
found++;
1156+
found = true;
11571157
/*
11581158
* load-load control dependency between phase and the rest of
11591159
* the cqe requires a full read memory barrier

0 commit comments

Comments
 (0)