public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6] Add missing MODULE_PARAM to dummy.c (and MAINTAINERShip)
@ 2004-04-08 17:48 Jose Luis Domingo Lopez
  2004-04-08 17:54 ` Chris Wright
  2004-04-08 19:10 ` Nick Holloway
  0 siblings, 2 replies; 5+ messages in thread
From: Jose Luis Domingo Lopez @ 2004-04-08 17:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: Nick.Holloway

Hello:

It seems the "dummy" network interface driver is missing some MODULE_*
macros, needed with kernel 2.6.x and module-init-tools to show
information about the module (parameters, author, description, etc).

A patch follows to (hopefully) correct this. Another patch includes an
entry in the MAINTAINERS file for the "dummy" module. However, I suppose 
the module author (Nick Holloway) will come up and say if he should
still be considered as the module maintainer, so to add the correct
information to the MAINTAINERS file.

Hope the patchs are correct, or at least useful to note the missing bits
I was trying to "patch" and someone else does the "technical" work :-)

Greetings.

-- 
Jose Luis Domingo Lopez
Linux Registered User #189436     Debian Linux Sid (Linux 2.6.5)


diff -Nrup linux-2.6.5/drivers/net/dummy.c linux-2.6.5-new/drivers/net/dummy.c
--- linux-2.6.5/drivers/net/dummy.c	2004-04-04 17:45:54.000000000 +0200
+++ linux-2.6.5-new/drivers/net/dummy.c	2004-04-08 19:23:23.000000000 +0200
@@ -89,7 +89,8 @@ static struct net_device_stats *dummy_ge
 static struct net_device **dummies;
 
 /* Number of dummy devices to be set up by this module. */
-module_param(numdummies, int, 0);
+MODULE_PARM(numdummies, "i");
+MODULE_PARM_DESC(numdummies, "Maximum number of dummy devices (defaults to one)");
 
 static int __init dummy_init_one(int index)
 {
@@ -144,3 +145,5 @@ static void __exit dummy_cleanup_module(
 module_init(dummy_init_module);
 module_exit(dummy_cleanup_module);
 MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Dummy network interface driver");
+MODULE_AUTHOR("Nick Holloway <Nick.Holloway@pyrites.org.uk>");

diff -Nrup linux-2.6.5/MAINTAINERS linux-2.6.5-new/MAINTAINERS
--- linux-2.6.5/MAINTAINERS	2004-04-04 17:49:26.000000000 +0200
+++ linux-2.6.5-new/MAINTAINERS	2004-04-08 19:22:01.000000000 +0200
@@ -707,6 +707,12 @@ M:	romieu@cogenit.fr
 M:	romieu@ensta.fr
 S:	Maintained
 
+DUMMY NETWORK INTERFACE DRIVER
+P:	Nick Holloway
+M:	Nick.Holloway@pyrites.org.uk
+L:	linux-kernel@vger.kernel.org
+S:	Supported
+
 DVB SUBSYSTEM AND DRIVERS
 P:	LinuxTV.org Project
 M: 	linux-dvb-maintainer@linuxtv.org

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

* Re: [PATCH 2.6] Add missing MODULE_PARAM to dummy.c (and MAINTAINERShip)
  2004-04-08 17:48 [PATCH 2.6] Add missing MODULE_PARAM to dummy.c (and MAINTAINERShip) Jose Luis Domingo Lopez
@ 2004-04-08 17:54 ` Chris Wright
  2004-04-08 18:59   ` Jose Luis Domingo Lopez
  2004-04-08 19:10 ` Nick Holloway
  1 sibling, 1 reply; 5+ messages in thread
From: Chris Wright @ 2004-04-08 17:54 UTC (permalink / raw)
  To: linux-kernel, Nick.Holloway

* Jose Luis Domingo Lopez (linux-kernel@24x7linux.com) wrote:
> diff -Nrup linux-2.6.5/drivers/net/dummy.c linux-2.6.5-new/drivers/net/dummy.c
> --- linux-2.6.5/drivers/net/dummy.c	2004-04-04 17:45:54.000000000 +0200
> +++ linux-2.6.5-new/drivers/net/dummy.c	2004-04-08 19:23:23.000000000 +0200
> @@ -89,7 +89,8 @@ static struct net_device_stats *dummy_ge
>  static struct net_device **dummies;
>  
>  /* Number of dummy devices to be set up by this module. */
> -module_param(numdummies, int, 0);
> +MODULE_PARM(numdummies, "i");
> +MODULE_PARM_DESC(numdummies, "Maximum number of dummy devices (defaults to one)");

this is going backwards.  module_param is the newer (preferred) interface.

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

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

* Re: [PATCH 2.6] Add missing MODULE_PARAM to dummy.c (and MAINTAINERShip)
  2004-04-08 17:54 ` Chris Wright
@ 2004-04-08 18:59   ` Jose Luis Domingo Lopez
  2004-04-08 19:29     ` Chris Wright
  0 siblings, 1 reply; 5+ messages in thread
From: Jose Luis Domingo Lopez @ 2004-04-08 18:59 UTC (permalink / raw)
  To: Chris Wright; +Cc: linux-kernel, Nick.Holloway

On Thursday, 08 April 2004, at 10:54:40 -0700,
Chris Wright wrote:

> this is going backwards.  module_param is the newer (preferred) interface.
> 
I (incorrectly) based my assumptions on the fact that "modinfo dummy"
didn't return any information about the module parameter. I also had a
look at some other modules, like "bonding", "rtl8139", and I assumed
that the MODULE_* macros were the 2.6.x way of doing things.

I was obviously wrong, sorry for the waste of time (anyways, it seems
there are several kernel modules waiting to be updated, maybe I should
give them a look and learn something and try to "fix" them).

Greetings.

-- 
Jose Luis Domingo Lopez
Linux Registered User #189436     Debian Linux Sid (Linux 2.6.5)

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

* Re: [PATCH 2.6] Add missing MODULE_PARAM to dummy.c (and MAINTAINERShip)
  2004-04-08 17:48 [PATCH 2.6] Add missing MODULE_PARAM to dummy.c (and MAINTAINERShip) Jose Luis Domingo Lopez
  2004-04-08 17:54 ` Chris Wright
@ 2004-04-08 19:10 ` Nick Holloway
  1 sibling, 0 replies; 5+ messages in thread
From: Nick Holloway @ 2004-04-08 19:10 UTC (permalink / raw)
  To: linux-kernel

On Thu, Apr 08, 2004 at 07:48:23PM +0200, Jose Luis Domingo Lopez wrote:
> A patch follows to (hopefully) correct this. Another patch includes an
> entry in the MAINTAINERS file for the "dummy" module. However, I suppose 
> the module author (Nick Holloway) will come up and say if he should
> still be considered as the module maintainer, so to add the correct
> information to the MAINTAINERS file.

I wouldn't consider myself the maintainer.  I did the original development
to get it into the tree (nearly 10 years ago), but changes have been
made by others.

I don't think an explicit maintainer needs to be mentioned, as it falls
under the umbrella of network maintainance.

-- 
 `O O'  | Nick.Holloway@pyrites.org.uk
// ^ \\ | http://www.pyrites.org.uk/

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

* Re: [PATCH 2.6] Add missing MODULE_PARAM to dummy.c (and MAINTAINERShip)
  2004-04-08 18:59   ` Jose Luis Domingo Lopez
@ 2004-04-08 19:29     ` Chris Wright
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wright @ 2004-04-08 19:29 UTC (permalink / raw)
  To: Chris Wright, linux-kernel, Nick.Holloway

* Jose Luis Domingo Lopez (linux-kernel@24x7linux.com) wrote:
> On Thursday, 08 April 2004, at 10:54:40 -0700,
> Chris Wright wrote:
> 
> > this is going backwards.  module_param is the newer (preferred) interface.
> > 
> I (incorrectly) based my assumptions on the fact that "modinfo dummy"
> didn't return any information about the module parameter. I also had a
> look at some other modules, like "bonding", "rtl8139", and I assumed
> that the MODULE_* macros were the 2.6.x way of doing things.

It's a mix.  module_param(), MODULE_PARM_DESC(), MODULE_LICENSE(),
MODULE_AUTHOR(), MODULE_DESCRIPTION().

So the whole patch isn't bad, just the bit like:
-module_param()
+MODULE_PARM()

> I was obviously wrong, sorry for the waste of time (anyways, it seems
> there are several kernel modules waiting to be updated, maybe I should
> give them a look and learn something and try to "fix" them).

Sure, although some of these changes may not be accepted simply because
they create noise, patch conflicts etc at a time where stability is more
important.  So new code should use the new ones, old code may not all be
converted for some time.

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

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

end of thread, other threads:[~2004-04-08 19:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-08 17:48 [PATCH 2.6] Add missing MODULE_PARAM to dummy.c (and MAINTAINERShip) Jose Luis Domingo Lopez
2004-04-08 17:54 ` Chris Wright
2004-04-08 18:59   ` Jose Luis Domingo Lopez
2004-04-08 19:29     ` Chris Wright
2004-04-08 19:10 ` Nick Holloway

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox