[PATCH 2/2] nvme-pci: cleanup nvme_irq()

Chaitanya Kulkarni chaitanya.kulkarni at wdc.com
Fri Feb 19 01:37:37 EST 2021


Get rid of the local variables which are not needed. Instead rename
the function parameter from data -> nvmeq and return from the if
check than having a variable.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
---
 drivers/nvme/host/pci.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 3729775f6a8a..922cbaa7e4ee 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1057,15 +1057,12 @@ static inline int nvme_process_cq(struct nvme_queue *nvmeq)
 	return found;
 }
 
-static irqreturn_t nvme_irq(int irq, void *data)
+static irqreturn_t nvme_irq(int irq, void *nvmeq)
 {
-	struct nvme_queue *nvmeq = data;
-	irqreturn_t ret = IRQ_NONE;
-
 	if (nvme_process_cq(nvmeq))
-		ret = IRQ_HANDLED;
+		return IRQ_HANDLED;
 
-	return ret;
+	return IRQ_NONE;
 }
 
 static irqreturn_t nvme_irq_check(int irq, void *data)
-- 
2.22.1




More information about the Linux-nvme mailing list