2006-01-08 20:28:56

by Alexey Dobriyan

[permalink] [raw]
Subject: MODULE_VERSION useless? (was Re: [KJ] adding missing MODULE_* stuffs)

On Thu, Dec 29, 2005 at 04:04:00PM -0800, Kees Cook wrote:
> Would patches towards adding missing MODULE_DESCRIPTION, MODULE_VERSION,
> and MODULE_AUTHOR stuff be taken? While these aren't covered in the
> CodingStyle document, I did find reference to their preferred order in
> Documentation/i2c/porting-clients.txt where Greg KH said the order
> should be:
>
> MODULE_AUTHOR
> MODULE_DESCRIPTION
> MODULE_LICENSE /* last line of source */
>
> I'm curious where MODULE_VERSION should go, as well as
> MODULE_PARAM_DESC.
>
> Notably, AUTHOR, DESCRIPTION, and VERSION seem to be missing from the
> various examples in Documention/

I hate MODULE_VERSION. It stops making sense after the following
definition:

Version of a module is a version of kernel it was shipped with.

Given: module 8139too version 0.9.27 is buggy in somesuch way.
Question: which one?

There were quite a few nontrivial changes made since transition to git:
-----------------------------------------------------------------------
Christoph Lameter:
Cleanup patch for process freezing

Jeff Garzik:
[netdrvr 8139too] replace hand-crafted kernel thread with workqueue
[netdrvr 8139too] use cancel_rearming_delayed_work() to cancel thread
[netdrvr 8139too] use rtnl_shlock_nowait() rather than rtnl_lock_interruptible()
[netdrvr 8139too] fast poll for thread, if an unlikely race occurs

John W. Linville:
8139too: support ETHTOOL_GPERMADDR
8139too: fix resume for Realtek 8100B/8139D

Olaf Hering:
turn many #if $undefined_string into #ifdef $undefined_string

Pekka Enberg:
8139too: use iomap for pio/mmio
-----------------------------------------------------------------------
None of the above changes touched MODULE_VERSION. It's still 0.9.27.

MODULE_VERSION is almost always outdated. You can't rely on it in
bugreports. All you can rely on is kernel version, be it 2.6.15-git1 or
2.6.15-0aec63e67c69545ca757a73a66f5dcf05fa484bf.


Subject: Re: MODULE_VERSION useless? (was Re: [KJ] adding missing MODULE_* stuffs)

Hi everyone,

I have two ideas about what to do with MODULE_VERSION:
1.- Defining MODULE_VERSION = KERNEL_VERSION
2.- Schedule it for removal in one or two more versions, and automagically use
the KERNEL_VERSION as module's version.

Any comments?

--
Carlos Manuel Duclos Vergara
http://www.toolchains.com/personal/blog

2006-01-08 21:58:52

by Greg KH

[permalink] [raw]
Subject: Re: MODULE_VERSION useless? (was Re: [KJ] adding missing MODULE_* stuffs)

On Sun, Jan 08, 2006 at 06:55:16PM -0300, Carlos Manuel Duclos Vergara wrote:
> Hi everyone,
>
> I have two ideas about what to do with MODULE_VERSION:
> 1.- Defining MODULE_VERSION = KERNEL_VERSION

No.

> 2.- Schedule it for removal in one or two more versions, and automagically use
> the KERNEL_VERSION as module's version.

No, just let the authors of the different drivers that want to use
MODULE_VERSION use it (for some people it does matter, and they keep it
up to date.) Everyone else, just don't add it if you don't care about
it.

> Any comments?

In short, leave it alone :)

thanks,

greg k-h

2006-01-08 22:03:09

by Matthew Wilcox

[permalink] [raw]
Subject: Re: MODULE_VERSION useless? (was Re: [KJ] adding missing MODULE_* stuffs)

On Sun, Jan 08, 2006 at 06:55:16PM -0300, Carlos Manuel Duclos Vergara wrote:
> I have two ideas about what to do with MODULE_VERSION:
> 1.- Defining MODULE_VERSION = KERNEL_VERSION
> 2.- Schedule it for removal in one or two more versions, and automagically use
> the KERNEL_VERSION as module's version.
>
> Any comments?

Do neither. Just because some people don't use it properly is no reason
to remove it.

2006-01-08 22:32:17

by Matt Domsch

[permalink] [raw]
Subject: Re: MODULE_VERSION useless? (was Re: [KJ] adding missing MODULE_* stuffs)

On Sun, Jan 08, 2006 at 01:58:00PM -0800, Greg KH wrote:
> On Sun, Jan 08, 2006 at 06:55:16PM -0300, Carlos Manuel Duclos Vergara wrote:
> > Hi everyone,
> >
> > I have two ideas about what to do with MODULE_VERSION:
> > 1.- Defining MODULE_VERSION = KERNEL_VERSION
>
> No.
>
> > 2.- Schedule it for removal in one or two more versions, and automagically use
> > the KERNEL_VERSION as module's version.
>
> No, just let the authors of the different drivers that want to use
> MODULE_VERSION use it (for some people it does matter, and they keep it
> up to date.) Everyone else, just don't add it if you don't care about
> it.

DKMS (http://linux.dell.com/dkms/) uses it to tell if one version is
newer than another. For the couple dozen modules Dell regularly cares
about, the module authors have been doing a good job of keeping
MODULE_VERSION correct, for exactly this reason.

> In short, leave it alone :)

Please!

--
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & http://www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com

2006-01-08 22:33:56

by Matt Domsch

[permalink] [raw]
Subject: Re: MODULE_VERSION useless? (was Re: [KJ] adding missing MODULE_* stuffs)

On Sun, Jan 08, 2006 at 01:58:00PM -0800, Greg KH wrote:
> On Sun, Jan 08, 2006 at 06:55:16PM -0300, Carlos Manuel Duclos Vergara wrote:
> >
> > I have two ideas about what to do with MODULE_VERSION:
> > 1.- Defining MODULE_VERSION = KERNEL_VERSION

vermagic already has KERNEL_VERSION, if that's what someone really
cares about.

--
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & http://www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com

2006-01-08 23:41:26

by Håkon Løvdal

[permalink] [raw]
Subject: Re: MODULE_VERSION useless? (was Re: [KJ] adding missing MODULE_* stuffs)

On 1/8/06, Carlos Manuel Duclos Vergara <[email protected]> wrote:
> Hi everyone,
>
> I have two ideas about what to do with MODULE_VERSION:
> 1.- Defining MODULE_VERSION = KERNEL_VERSION
> 2.- Schedule it for removal in one or two more versions, and automagically use
> the KERNEL_VERSION as module's version.
>
> Any comments?

I think there is another option:

3. Always print KERNEL_VERSION in addition to MODULE_VERSION.

Since for some modules MODULE_VERSION is considered useful and
KERNEL_VERSION always is useful, this should give the best of both, right?

BR H?kon L?vdal