* module.h and moduleparam.h: more header file pedantry
@ 2007-03-12 16:59 Robert P. J. Day
2007-03-13 22:05 ` Alexey Dobriyan
0 siblings, 1 reply; 3+ messages in thread
From: Robert P. J. Day @ 2007-03-12 16:59 UTC (permalink / raw)
To: Linux Kernel Mailing List
well, since my last adventure with header files went over so
swimmingly, i might as well keep going. :-)
to my surprise, i learned only today that module.h includes
moduleparam.h, which flies in the face of all of the documentation
i've ever read which was adamant that i *had* to include moduleparam.h
if i was using parameters. i'm guessing this comes as a surprise to
the 400+ header files which include both unnecessarily.
so ... in a perfect world, should a module source file that doesn't
use parameters *at all* need to include moduleparam.h? as it stands
now, yes, it does, given some ugly inter-dependencies between the two
files.
so, at the very least, programmers can stop including moduleparam.h,
unless there's a cleaner way to do all that.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: module.h and moduleparam.h: more header file pedantry
2007-03-13 22:05 ` Alexey Dobriyan
@ 2007-03-13 22:04 ` Robert P. J. Day
0 siblings, 0 replies; 3+ messages in thread
From: Robert P. J. Day @ 2007-03-13 22:04 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: linux-kernel, kernel-janitors
On Wed, 14 Mar 2007, Alexey Dobriyan wrote:
> On Mon, Mar 12, 2007 at 12:59:20PM -0400, Robert P. J. Day wrote:
> > to my surprise, i learned only today that module.h includes
> > moduleparam.h, which flies in the face of all of the documentation
> > i've ever read which was adamant that i *had* to include moduleparam.h
> > if i was using parameters. i'm guessing this comes as a surprise to
> > the 400+ header files which include both unnecessarily.
> >
> > so ... in a perfect world, should a module source file that doesn't
> > use parameters *at all* need to include moduleparam.h?
>
> Probably not.
>
> > as it stands
> > now, yes, it does, given some ugly inter-dependencies between the two
> > files.
> >
> > so, at the very least, programmers can stop including moduleparam.h,
> > unless there's a cleaner way to do all that.
>
> Regardless, of what you'll do: cross-compile test!
>
> After aforementioned removal and adding "struct kernel_param;"
>
> + akmk arm-assabet -k
> CHK include/linux/version.h
> make[2]: `include/asm-arm/mach-types.h' is up to date.
> Using /home/linux/linux-irq-flags-t as source for kernel
> GEN /home/linux/build/arm-assabet/Makefile
> CHK include/linux/utsrelease.h
> CHK include/linux/compile.h
> CC arch/arm/nwfpe/fpmodule.o
> arch/arm/nwfpe/fpmodule.c:179: error: syntax error before string constant
> arch/arm/nwfpe/fpmodule.c:179: warning: type defaults to `int' in declaration of `__MODULE_INFO'
> arch/arm/nwfpe/fpmodule.c:179: warning: function declaration isn't a prototype
> arch/arm/nwfpe/fpmodule.c:179: warning: data definition has no type or storage class
oh, i've already been by that and figured out what's going on. i'm
going to summarize this on the KJ wiki. it's really quite the mess.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: module.h and moduleparam.h: more header file pedantry
2007-03-12 16:59 module.h and moduleparam.h: more header file pedantry Robert P. J. Day
@ 2007-03-13 22:05 ` Alexey Dobriyan
2007-03-13 22:04 ` Robert P. J. Day
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Dobriyan @ 2007-03-13 22:05 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: linux-kernel, kernel-janitors
On Mon, Mar 12, 2007 at 12:59:20PM -0400, Robert P. J. Day wrote:
> to my surprise, i learned only today that module.h includes
> moduleparam.h, which flies in the face of all of the documentation
> i've ever read which was adamant that i *had* to include moduleparam.h
> if i was using parameters. i'm guessing this comes as a surprise to
> the 400+ header files which include both unnecessarily.
>
> so ... in a perfect world, should a module source file that doesn't
> use parameters *at all* need to include moduleparam.h?
Probably not.
> as it stands
> now, yes, it does, given some ugly inter-dependencies between the two
> files.
>
> so, at the very least, programmers can stop including moduleparam.h,
> unless there's a cleaner way to do all that.
Regardless, of what you'll do: cross-compile test!
After aforementioned removal and adding "struct kernel_param;"
+ akmk arm-assabet -k
CHK include/linux/version.h
make[2]: `include/asm-arm/mach-types.h' is up to date.
Using /home/linux/linux-irq-flags-t as source for kernel
GEN /home/linux/build/arm-assabet/Makefile
CHK include/linux/utsrelease.h
CHK include/linux/compile.h
CC arch/arm/nwfpe/fpmodule.o
arch/arm/nwfpe/fpmodule.c:179: error: syntax error before string constant
arch/arm/nwfpe/fpmodule.c:179: warning: type defaults to `int' in declaration of `__MODULE_INFO'
arch/arm/nwfpe/fpmodule.c:179: warning: function declaration isn't a prototype
arch/arm/nwfpe/fpmodule.c:179: warning: data definition has no type or storage class
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-03-13 22:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-12 16:59 module.h and moduleparam.h: more header file pedantry Robert P. J. Day
2007-03-13 22:05 ` Alexey Dobriyan
2007-03-13 22:04 ` Robert P. J. Day
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®