diff mbox series

scsi: cumana_2: Fix different dev_id between 'request_irq()' and 'free_irq()'

Message ID 20200530073555.577414-1-christophe.jaillet@wanadoo.fr (mailing list archive)
State Changes Requested
Headers show
Series scsi: cumana_2: Fix different dev_id between 'request_irq()' and 'free_irq()' | expand

Commit Message

Christophe JAILLET May 30, 2020, 7:35 a.m. UTC
The dev_id used in 'request_irq()' and 'free_irq()' should match.
So use 'host' in both cases.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/scsi/arm/cumana_2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Russell King (Oracle) May 30, 2020, 9:43 a.m. UTC | #1
On Sat, May 30, 2020 at 09:35:55AM +0200, Christophe JAILLET wrote:
> The dev_id used in 'request_irq()' and 'free_irq()' should match.
> So use 'host' in both cases.
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

This is itself wrong.  cumanascsi_2_intr() requires "info" as the devid.
Either cumanascsi_2_intr() needs changing to use shost_priv(host) along
with this change, or free_irq() needs changing to use "info".

Likely the same for the other patches, I haven't looked.
Christophe JAILLET May 30, 2020, 10:41 a.m. UTC | #2
Le 30/05/2020 à 11:43, Russell King - ARM Linux admin a écrit :
> On Sat, May 30, 2020 at 09:35:55AM +0200, Christophe JAILLET wrote:
>> The dev_id used in 'request_irq()' and 'free_irq()' should match.
>> So use 'host' in both cases.
>>
>> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> This is itself wrong.  cumanascsi_2_intr() requires "info" as the devid.
> Either cumanascsi_2_intr() needs changing to use shost_priv(host) along
> with this change, or free_irq() needs changing to use "info".

My bad.

I've only looked at the difference of the dev_id for the 2 functions, 
not at the usage of it with the function registered by 'request_irq'. 
This one is obviously correct, or the driver would have some problems 
somewhere.
I don't know why have chosen to change request_irq and not free_irq.

So obvious. I'm a little embarrassed and will send a v2.

Thx for the quick reply and review.


All the 3 patches being in "/drivers/scsi/arm/", do you prefer only 1 
patch for the 3, or separated as I've done so far?

CJ

> Likely the same for the other patches, I haven't looked.
>
diff mbox series

Patch

diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c
index 65691c21f133..3a3bf53fa925 100644
--- a/drivers/scsi/arm/cumana_2.c
+++ b/drivers/scsi/arm/cumana_2.c
@@ -426,7 +426,7 @@  static int cumanascsi2_probe(struct expansion_card *ec,
 		goto out_free;
 
 	ret = request_irq(ec->irq, cumanascsi_2_intr,
-			  0, "cumanascsi2", info);
+			  0, "cumanascsi2", host);
 	if (ret) {
 		printk("scsi%d: IRQ%d not free: %d\n",
 		       host->host_no, ec->irq, ret);