* newbie PATCH: add MODULE_AUTHORS_VERSION macro
@ 2002-03-06 0:17 Jim Cromie
2002-03-06 4:04 ` Keith Owens
0 siblings, 1 reply; 2+ messages in thread
From: Jim Cromie @ 2002-03-06 0:17 UTC (permalink / raw)
To: linux-kernel
I humbly submit for your consideration: (please cc, im not subscribed)
[jimc@groucho linux]$ diff -u module.h module.h.new
--- module.h Wed Feb 27 04:22:33 2002
+++ module.h.new Tue Mar 5 15:39:39 2002
@@ -206,6 +206,10 @@
const char __module_author[] __attribute__((section(".modinfo"))) =
\
"author=" name
+#define MODULE_AUTHORS_VERSION(name) \
+const char __module_authors_version[]
__attribute__((section(".modinfo"))) = \
+"authors_version=" name
+
#define MODULE_DESCRIPTION(desc) \
const char __module_description[] __attribute__((section(".modinfo")))
= \
"description=" desc
intent is to make more info available to modinfo.
hopefully the macro name is good enough to make this obvious,
ie distinguish it from MODVERSIONS etc..
Im slightly puzzled why its not already there, (it makes me think Im
missing something),
but I did the search (this isnt same as AUTHOR printk thread (83) from
last summer),
so what the heck ...
assuming this patch is accepted, should I ? (being an optimist here)?
1. grep sources and patch modules which have a VERSION of some sort, like
arch/i386/kernel/mtrr.c:#define MTRR_VERSION "1.40 (20010327)"
arch/i386/kernel/microcode.c:#define MICROCODE_VERSION "1.09"
ie should i do the janitor work, or leave it to authors/maintainers ?
case-by-case ?
2. or should I try to devise a better macro that slaps together __FILE__
and "_VERSION" to
automatically provide the macro definitions created by the above #defines.
This could be mis-used where filename != module-name, unless the macro,
when cppd in,
can selectively undef itself. ( this option is mostly food for thought,
dunno if its practical )
3. modinfo patches ?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: newbie PATCH: add MODULE_AUTHORS_VERSION macro
2002-03-06 0:17 newbie PATCH: add MODULE_AUTHORS_VERSION macro Jim Cromie
@ 2002-03-06 4:04 ` Keith Owens
0 siblings, 0 replies; 2+ messages in thread
From: Keith Owens @ 2002-03-06 4:04 UTC (permalink / raw)
To: Jim Cromie; +Cc: linux-kernel
On Tue, 05 Mar 2002 17:17:49 -0700,
Jim Cromie <jcromie@divsol.com> wrote:
>[jimc@groucho linux]$ diff -u module.h module.h.new
>--- module.h Wed Feb 27 04:22:33 2002
>+++ module.h.new Tue Mar 5 15:39:39 2002
>@@ -206,6 +206,10 @@
> const char __module_author[] __attribute__((section(".modinfo"))) =
> \
> "author=" name
>
>+#define MODULE_AUTHORS_VERSION(name) \
>+const char __module_authors_version[]
>__attribute__((section(".modinfo"))) = \
>+"authors_version=" name
>+
> #define MODULE_DESCRIPTION(desc) \
> const char __module_description[] __attribute__((section(".modinfo")))
>= \
> "description=" desc
>
>1. grep sources and patch modules which have a VERSION of some sort, like
>
>arch/i386/kernel/mtrr.c:#define MTRR_VERSION "1.40 (20010327)"
mtrr cannot be a module, bool CONFIG_MTRR.
>arch/i386/kernel/microcode.c:#define MICROCODE_VERSION "1.09"
MODULE_DESCRIPTION("Intel CPU (IA-32) microcode update driver" MICROCODE_VERSION);
No need for another module_* macro.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-03-06 4:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-06 0:17 newbie PATCH: add MODULE_AUTHORS_VERSION macro Jim Cromie
2002-03-06 4:04 ` Keith Owens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox