* [PATCH 2/2] nvme-pci: cleanup nvme_irq()
@ 2021-02-19 6:37 Chaitanya Kulkarni
0 siblings, 0 replies; only message in thread
From: Chaitanya Kulkarni @ 2021-02-19 6:37 UTC (permalink / raw
To: linux-nvme; +Cc: kbusch, hch, Chaitanya Kulkarni, sagi
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@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
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-19 6:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-19 6:37 [PATCH 2/2] nvme-pci: cleanup nvme_irq() Chaitanya Kulkarni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.