lkml.org 
[lkml]   [2000]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: (correction) Re: [patch-2.3.52-p2] cleanup of <linux/fs.h>


On Tue, 14 Mar 2000, Jeff Garzik wrote:
> On Mon, 13 Mar 2000, Alexander Viro wrote:
> > On Mon, 13 Mar 2000, Tigran Aivazian wrote:
> >
> > > my previous patch was incomplete because <linux/fs.h> needed
> > > <linux/module.h> to access THIS_MODULE. Here is the correct version:
> >
> > ... and that means that you got
> > #define __NO_VERSION__ in a _lot_ of places. Precisely the reason why I
> > did it that way...
>
> The other way is arguably more correct, even if it is more grunt work...

What I'd really like to see:
- get rid of __NO_VERSION__ entirely
- get rid of the silly EXPORT_SYMTAB requirements entirely.
- every single file should be able to do EXPORT(), and let's use
something like "make checkconfig" to make sure that they are correctly
marked in the makefiles as requireing the module treatment, instead of
the current EXPORT_SYMTAB thing that causes errors if you want to make
individual .s or .o files with "make drivers/xxxx/yyyy.s"

The versioning flags could equally easily be handled by a very simple
macro, so that an independent module would usually end with the magic
incantation

module_version();
module_init(init_xxxx);
module_exit(exit_xxxx);

and it would magically do the right thing in all cases (and a
non-independent object file that gets linked into a bigger module would
just not have these lines - no need for the __NO_VERSION__ stuff).

With those two cleanups, a module would look very clean indeed. Just
include <linux/module.h> and don't worry about things..

Comments?

Linus


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

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.054 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site