* [PATCH] scsi: hpsa: free irq on q indexed by h->intr_mode and not i
@ 2016-11-14 12:59 Colin King
2016-11-14 15:42 ` Christoph Hellwig
2016-11-14 23:36 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2016-11-14 12:59 UTC (permalink / raw)
To: Christoph Hellwig, Don Brace, James E . J . Bottomley,
Martin K . Petersen, esc.storagedev, linux-scsi
Cc: linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Use correct index on q, use h->intr_mode instead of i. Issue
detected using static analysis with cppcheck
Fixes: bc2bb1543e62a5d0 ("scsi: hpsa: use pci_alloc_irq_vectors and automatic irq affinity")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/scsi/hpsa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 9459925..0d4f21c 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -8220,7 +8220,7 @@ static void hpsa_free_irqs(struct ctlr_info *h)
if (!h->msix_vectors || h->intr_mode != PERF_MODE_INT) {
/* Single reply queue, only one irq to free */
- free_irq(pci_irq_vector(h->pdev, 0), &h->q[i]);
+ free_irq(pci_irq_vector(h->pdev, 0), &h->q[h->intr_mode]);
h->q[h->intr_mode] = 0;
return;
}
--
2.10.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: hpsa: free irq on q indexed by h->intr_mode and not i
2016-11-14 12:59 [PATCH] scsi: hpsa: free irq on q indexed by h->intr_mode and not i Colin King
@ 2016-11-14 15:42 ` Christoph Hellwig
2016-11-14 23:36 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2016-11-14 15:42 UTC (permalink / raw)
To: Colin King
Cc: Christoph Hellwig, Don Brace, James E . J . Bottomley,
Martin K . Petersen, esc.storagedev, linux-scsi, linux-kernel
Looks fine, I was actually about to send the same fix..
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: hpsa: free irq on q indexed by h->intr_mode and not i
2016-11-14 12:59 [PATCH] scsi: hpsa: free irq on q indexed by h->intr_mode and not i Colin King
2016-11-14 15:42 ` Christoph Hellwig
@ 2016-11-14 23:36 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2016-11-14 23:36 UTC (permalink / raw)
To: Colin King
Cc: Christoph Hellwig, Don Brace, James E . J . Bottomley,
Martin K . Petersen, esc.storagedev, linux-scsi, linux-kernel
>>>>> "Colin" == Colin King <colin.king@canonical.com> writes:
Colin> From: Colin Ian King <colin.king@canonical.com> Use correct index
Colin> on q, use h->intr_mode instead of i. Issue detected using static
Colin> analysis with cppcheck
Applied to 4.10/scsi-queue.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-14 23:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-14 12:59 [PATCH] scsi: hpsa: free irq on q indexed by h->intr_mode and not i Colin King
2016-11-14 15:42 ` Christoph Hellwig
2016-11-14 23:36 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).