linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* shouldn't "irq" be module_param_array instead of module_param in scsi/gdth.c ?
@ 2005-01-30 16:01 Jesper Juhl
  2005-01-30 16:48 ` Randy.Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Jesper Juhl @ 2005-01-30 16:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Achim Leubner, Boji Tony Kannanthanam, Johannes Dinner, linux-scsi


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@dif.dk>

--- 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);



-- 
Kind regards,
  Jesper Juhl

PS. Please CC me on replies.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: shouldn't "irq" be module_param_array instead of module_param in scsi/gdth.c ?
  2005-01-30 16:01 shouldn't "irq" be module_param_array instead of module_param in scsi/gdth.c ? Jesper Juhl
@ 2005-01-30 16:48 ` Randy.Dunlap
  2005-01-30 17:06   ` Jesper Juhl
  0 siblings, 1 reply; 4+ messages in thread
From: Randy.Dunlap @ 2005-01-30 16:48 UTC (permalink / raw)
  To: Jesper Juhl
  Cc: linux-kernel, Achim Leubner, Boji Tony Kannanthanam,
	Johannes Dinner, linux-scsi

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@dif.dk>
> 
> --- 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

-- 
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: shouldn't "irq" be module_param_array instead of module_param in scsi/gdth.c ?
  2005-01-30 17:06   ` Jesper Juhl
@ 2005-01-30 17:01     ` Randy.Dunlap
  0 siblings, 0 replies; 4+ messages in thread
From: Randy.Dunlap @ 2005-01-30 17:01 UTC (permalink / raw)
  To: Jesper Juhl
  Cc: linux-kernel, Achim Leubner, Boji Tony Kannanthanam,
	Johannes Dinner, linux-scsi

Jesper Juhl wrote:
> 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@dif.dk>
>>>
>>>--- 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.

Or I should have added to my reply:

Acked-by: Randy Dunlap <rddunlap@osdl.org>   8:}

-- 
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: shouldn't "irq" be module_param_array instead of module_param in scsi/gdth.c ?
  2005-01-30 16:48 ` Randy.Dunlap
@ 2005-01-30 17:06   ` Jesper Juhl
  2005-01-30 17:01     ` Randy.Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Jesper Juhl @ 2005-01-30 17:06 UTC (permalink / raw)
  To: Randy.Dunlap
  Cc: linux-kernel, Achim Leubner, Boji Tony Kannanthanam,
	Johannes Dinner, linux-scsi

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@dif.dk>
> > 
> > --- 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 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-01-30 17:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-30 16:01 shouldn't "irq" be module_param_array instead of module_param in scsi/gdth.c ? Jesper Juhl
2005-01-30 16:48 ` Randy.Dunlap
2005-01-30 17:06   ` Jesper Juhl
2005-01-30 17:01     ` Randy.Dunlap

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).