Re: shouldn't "irq" be module_param_array instead of module_paramin scsi/gdth.c ?

From: Jesper Juhl
Date: Sun Jan 30 2005 - 12:07:52 EST


On Sun, 30 Jan 2005, Randy.Dunlap wrote:

> Jesper Juhl wrote:
> > This little warning made me take a closer look : drivers/scsi/gdth.c:645:
> > warning: return from incompatible pointer type
> >
> > And line 645 looks like this :
> >
> > module_param(irq, int, 0);
> >
> > looking a bit up in the file I find :
> >
> > /* IRQ list for GDT3000/3020 EISA controllers */
> > static int irq[MAXHA] __initdata =
> > {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
> > 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
> >
> > That certainly looks like an array to me, so I'm wondering if something like
> > this patch would be correct? I'm not familliar enough with module_param* to
> > be completely confident, but this silences the warning.
> >
> > Signed-off-by: Jesper Juhl <juhl-lkml@xxxxxx>
> >
> > --- linux-2.6.11-rc2-bk7-orig/drivers/scsi/gdth.c 2005-01-22
> > 21:59:46.000000000 +0100
> > +++ linux-2.6.11-rc2-bk7/drivers/scsi/gdth.c 2005-01-30 16:52:45.000000000
> > +0100
> > @@ -642,7 +642,7 @@ static int probe_eisa_isa = 0;
> > static int force_dma32 = 0;
> > /* parameters for modprobe/insmod */
> > -module_param(irq, int, 0);
> > +module_param_array(irq, int, NULL, 0);
> > module_param(disable, int, 0);
> > module_param(reserve_mode, int, 0);
> > module_param_array(reserve_list, int, NULL, 0);
>
> Yep, same as:
> http://marc.theaimsgroup.com/?l=linux-scsi&m=110540330511653&w=2
>
Ohh, I was not aware of that patch, guess I should have searched the
archives before posting. Thank you for the info.

--
Jesper

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/