linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/via-rhine: convert MODULE_PARM to module_param
@ 2004-11-29 23:58 Jesper Juhl
  2004-11-30 14:03 ` Roger Luethi
  0 siblings, 1 reply; 4+ messages in thread
From: Jesper Juhl @ 2004-11-29 23:58 UTC (permalink / raw)
  To: Roger Luethi; +Cc: linux-kernel

Hi,

These warnings told me that it was time to move to module_param() :)

drivers/net/via-rhine.c:229: warning: `MODULE_PARM_' is deprecated (declared at include/linux/module.h:562)
drivers/net/via-rhine.c:230: warning: `MODULE_PARM_' is deprecated (declared at include/linux/module.h:562)
drivers/net/via-rhine.c:231: warning: `MODULE_PARM_' is deprecated (declared at include/linux/module.h:562)

So I made this small patch to do so.
Compile and boot tested on my box, and it seems to work just fine, the 
module works perfectly with my via-rhine card, and the parameters are 
exposed through sysfs as expected : 

juhl@dragon:~$ ls -l /sys/module/via_rhine/parameters/*
-rw-r--r--  1 root root    0 2004-11-30 00:51 /sys/module/via_rhine/parameters/debug
-r--r--r--  1 root root    0 2004-11-30 00:50 /sys/module/via_rhine/parameters/max_interrupt_work
-r--r--r--  1 root root 4096 2004-11-30 00:50 /sys/module/via_rhine/parameters/rx_copybreak

juhl@dragon:~$ cat /sys/module/via_rhine/parameters/debug
1
juhl@dragon:~$ cat /sys/module/via_rhine/parameters/max_interrupt_work
20
juhl@dragon:~$ cat /sys/module/via_rhine/parameters/rx_copybreak
0


Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>

diff -up linux-2.6.10-rc2-bk13-orig/drivers/net/via-rhine.c linux-2.6.10-rc2-bk13/drivers/net/via-rhine.c
--- linux-2.6.10-rc2-bk13-orig/drivers/net/via-rhine.c	2004-11-17 01:19:51.000000000 +0100
+++ linux-2.6.10-rc2-bk13/drivers/net/via-rhine.c	2004-11-30 00:16:36.000000000 +0100
@@ -226,9 +226,9 @@ MODULE_AUTHOR("Donald Becker <becker@scy
 MODULE_DESCRIPTION("VIA Rhine PCI Fast Ethernet driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(max_interrupt_work, "i");
-MODULE_PARM(debug, "i");
-MODULE_PARM(rx_copybreak, "i");
+module_param(max_interrupt_work, int, 0444);
+module_param(debug, int, 0644);
+module_param(rx_copybreak, int, 0444);
 MODULE_PARM_DESC(max_interrupt_work, "VIA Rhine maximum events handled per interrupt");
 MODULE_PARM_DESC(debug, "VIA Rhine debug level (0-7)");
 MODULE_PARM_DESC(rx_copybreak, "VIA Rhine copy breakpoint for copy-only-tiny-frames");



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

* Re: [PATCH] net/via-rhine: convert MODULE_PARM to module_param
  2004-11-29 23:58 [PATCH] net/via-rhine: convert MODULE_PARM to module_param Jesper Juhl
@ 2004-11-30 14:03 ` Roger Luethi
  2004-11-30 21:44   ` Jesper Juhl
  0 siblings, 1 reply; 4+ messages in thread
From: Roger Luethi @ 2004-11-30 14:03 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: linux-kernel

On Tue, 30 Nov 2004 00:58:58 +0100, Jesper Juhl wrote:
> These warnings told me that it was time to move to module_param() :)
> 
> drivers/net/via-rhine.c:229: warning: `MODULE_PARM_' is deprecated (declared at include/linux/module.h:562)
> drivers/net/via-rhine.c:230: warning: `MODULE_PARM_' is deprecated (declared at include/linux/module.h:562)
> drivers/net/via-rhine.c:231: warning: `MODULE_PARM_' is deprecated (declared at include/linux/module.h:562)
> 
> So I made this small patch to do so.
> Compile and boot tested on my box, and it seems to work just fine, the 
> module works perfectly with my via-rhine card, and the parameters are 
> exposed through sysfs as expected : 

IIRC Jeff has already queued such a patch for 2.6.11. Thanks, though.

Roger

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

* Re: [PATCH] net/via-rhine: convert MODULE_PARM to module_param
  2004-11-30 14:03 ` Roger Luethi
@ 2004-11-30 21:44   ` Jesper Juhl
  2004-11-30 22:04     ` Roger Luethi
  0 siblings, 1 reply; 4+ messages in thread
From: Jesper Juhl @ 2004-11-30 21:44 UTC (permalink / raw)
  To: Roger Luethi; +Cc: linux-kernel

On Tue, 30 Nov 2004, Roger Luethi wrote:

> On Tue, 30 Nov 2004 00:58:58 +0100, Jesper Juhl wrote:
> > These warnings told me that it was time to move to module_param() :)
> > 
> > drivers/net/via-rhine.c:229: warning: `MODULE_PARM_' is deprecated (declared at include/linux/module.h:562)
> > drivers/net/via-rhine.c:230: warning: `MODULE_PARM_' is deprecated (declared at include/linux/module.h:562)
> > drivers/net/via-rhine.c:231: warning: `MODULE_PARM_' is deprecated (declared at include/linux/module.h:562)
> > 
> > So I made this small patch to do so.
> > Compile and boot tested on my box, and it seems to work just fine, the 
> > module works perfectly with my via-rhine card, and the parameters are 
> > exposed through sysfs as expected : 
> 
> IIRC Jeff has already queued such a patch for 2.6.11. 

Hmm, ok. I assume that's what's currently in -mm - I haven't been 
following -mm lately so I missed the fact that the driver in there had 
already moved to module_param().  There's one difference though, and I 
think it matters; my patch sets the permission bits so that the parameters 
get exposed in sysfs (which I think is very useful), the driver in -mm 
sets the perms to 0 (zero) so nothing is exposed in sysfs (less useful).

>Thanks, though.

You are very welcome.

 
-- 
Jesper Juhl



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

* Re: [PATCH] net/via-rhine: convert MODULE_PARM to module_param
  2004-11-30 21:44   ` Jesper Juhl
@ 2004-11-30 22:04     ` Roger Luethi
  0 siblings, 0 replies; 4+ messages in thread
From: Roger Luethi @ 2004-11-30 22:04 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: linux-kernel

On Tue, 30 Nov 2004 22:44:37 +0100, Jesper Juhl wrote:
> already moved to module_param().  There's one difference though, and I 
> think it matters; my patch sets the permission bits so that the parameters 
> get exposed in sysfs (which I think is very useful), the driver in -mm 
> sets the perms to 0 (zero) so nothing is exposed in sysfs (less useful).

I am not familiar with the issue. Can you work out with the submitter of
the -mm patch why it was coded that way, and if your version is better?

Roger

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

end of thread, other threads:[~2004-11-30 22:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-29 23:58 [PATCH] net/via-rhine: convert MODULE_PARM to module_param Jesper Juhl
2004-11-30 14:03 ` Roger Luethi
2004-11-30 21:44   ` Jesper Juhl
2004-11-30 22:04     ` Roger Luethi

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