login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
December
»
23
Re: [PATCH] Show version information for built-in modules in sysfs
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Rusty Russell
Subject:
Re: [PATCH] Show version information for built-in modules in sysfs
Date: Wednesday, December 22, 2010 - 7:27 pm
On Thu, 23 Dec 2010 11:08:23 am Dmitry Torokhov wrote:
quoted text
> On Tue, Dec 21, 2010 at 05:48:45PM -0800, Rusty Russell wrote: > > On Wed, 22 Dec 2010 11:47:12 am Dmitry Torokhov wrote: > > > On Tue, Dec 21, 2010 at 05:02:40PM -0800, Rusty Russell wrote: > > > > On Thu, 16 Dec 2010 08:30:19 am Dmitry Torokhov wrote: > > > > > + > > > > > +#ifdef MODULE > > > > > #define MODULE_VERSION(_version) MODULE_INFO(version, _version) > > > > > +#else > > > > > +#define MODULE_VERSION(_version) \ > > > > > + extern ssize_t __modver_version_show(struct module_attribute *, \ > > > > > + struct module *, char *); \ > > > > > + static struct module_version_attribute __modver_version_attr \ > > > > > + __used \ > > > > > + __attribute__ ((unused,__section__ ("__modver"),aligned(sizeof(void *)))) \ > > > > > > > > __used and unused seems overkill, and confused. > > > > > > > > > > Must admit that I copied used/unused verbatim from linux/moduleparam.h: > > > > > > /* This is the fundamental function for registering boot/module > > > parameters. */ > > > #define __module_param_call(prefix, name, ops, arg, isbool, perm) \ > > > /* Default value instead of permissions? */ \ > > > static int __param_perm_check_##name __attribute__((unused)) = \ > > > BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)) \ > > > + BUILD_BUG_ON_ZERO(sizeof(""prefix) > MAX_PARAM_PREFIX_LEN); \ > > > static const char __param_str_##name[] = prefix #name; \ > > > static struct kernel_param __moduleparam_const __param_##name \ > > > __used \ > > > __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \ > > > = { __param_str_##name, ops, perm, isbool ? KPARAM_ISBOOL : 0, \ > > > { arg } } > > > > > > > > > So should it be removed from here as well? > > > > I think so, but (as always!) check git blame. > > > > Whew, found it: > > commit 4d62364652499ef106d1c0737968a879ef077bd4 > Author: akpm <akpm> > Date: Tue Jan 20 05:13:24 2004 +0000 > > [PATCH] make gcc 3.4 compilation work > > From: David Mosberger <davidm@napali.hpl.hp.com> > > With gcc-3.4 we need "attribute((used))" declarations to get "make > modules_install" to work. > > Otherwise these sections get dropped from the final image (I assume). > > BKrev: 400cb8f4ByHxZCElstAaZ3mBZ2oflQ > > ... > > diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h > index 0a5becb..cbca007 100644 > --- a/include/linux/moduleparam.h > +++ b/include/linux/moduleparam.h > @@ -52,6 +52,7 @@ struct kparam_array > #define __module_param_call(prefix, name, set, get, arg, perm) \ > static char __param_str_##name[] __initdata = prefix #name; \ > static struct kernel_param const __param_##name \ > + __attribute_used__ \ > __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \ > = { __param_str_##name, perm, set, get, arg } > > > Since we still claim to support GCC 3.4 I guess __used is still > needed...
Well, __used is correct. But this unused should have been removed at the same time. Cheers, Rusty. --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH] Show version information for built-in modules in sysfs
, Dmitry Torokhov
, (Wed Dec 15, 3:00 pm)
Re: [PATCH] Show version information for built-in modules ...
, Alexey Dobriyan
, (Wed Dec 15, 3:06 pm)
Re: [PATCH] Show version information for built-in modules ...
, Dmitry Torokhov
, (Wed Dec 15, 3:14 pm)
Re: [PATCH] Show version information for built-in modules ...
, Alexey Dobriyan
, (Wed Dec 15, 4:25 pm)
Re: [PATCH] Show version information for built-in modules ...
, Dmitry Torokhov
, (Wed Dec 15, 4:53 pm)
Re: [PATCH] Show version information for built-in modules ...
, Dmitry Torokhov
, (Wed Dec 15, 5:30 pm)
Re: [PATCH] Show version information for built-in modules ...
, Alexey Dobriyan
, (Thu Dec 16, 5:58 am)
Re: [PATCH] Show version information for built-in modules ...
, Rusty Russell
, (Tue Dec 21, 6:02 pm)
Re: [PATCH] Show version information for built-in modules ...
, Dmitry Torokhov
, (Tue Dec 21, 6:17 pm)
Re: [PATCH] Show version information for built-in modules ...
, Rusty Russell
, (Tue Dec 21, 6:45 pm)
Re: [PATCH] Show version information for built-in modules ...
, Rusty Russell
, (Tue Dec 21, 6:48 pm)
Re: [PATCH] Show version information for built-in modules ...
, Dmitry Torokhov
, (Wed Dec 22, 5:38 pm)
Re: [PATCH] Show version information for built-in modules ...
, Rusty Russell
, (Wed Dec 22, 7:27 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Mel Gorman
Re: [PATCH 1/4] vmstat: remove zone->lock from walk_zones_in_node
Guenter Roeck
Re: [lm-sensors] Location for thermal drivers
David Woodhouse
Re: RFC: Moving firmware blobs out of the kernel.
Siddha, Suresh B
Re: [PATCH 2.6.21 review I] [11/25] x86: default to physical mode on hotplug CPU k...
Peter Zijlstra
Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)
git-commits-head
:
Linux Kernel Mailing List
[MIPS] Fix potential latency problem due to non-atomic cpu_wait.
Linux Kernel Mailing List
USB: rename USB_SPEED_VARIABLE to USB_SPEED_WIRELESS
Linux Kernel Mailing List
lib/vsprintf.c: fix bug omitting minus sign of numbers (module_param)
Linux Kernel Mailing List
[Bluetooth] Initiate authentication during connection establishment
Linux Kernel Mailing List
[POWERPC] 4xx: Add ppc40x_defconfig
linux-netdev
:
MERCEDES
Your mail id has won 950,000.00 in the MERCEDES Benz Online Promo.for claims send:
David Miller
Re: [PATCH] xen/netfront: do not mark packets of length < MSS as GSO
David Miller
Re: skb_segment() questions
Shan Wei
[RFC PATCH net-next 2/5]IPv6:netfilter: Send an ICMPv6 "Fragment Reassembly Timeou...
Stanislaw Gruszka
[PATCH 1/4] bnx2x: use smp_mb() to keep ordering of read write operations
git
:
Nicolas Sebrecht
git-svn died of signal 11 (was "3 failures on test t9100 (svn)")
Junio C Hamano
Re: [PATCH 2/2] Add url.<base>.pushInsteadOf: URL rewriting for push only
Martin Langhoff
Re: [PATCH] GIT commit statistics.
Alexandre Julliard
[PATCH] gitweb: Put back shortlog instead of graphiclog in the project list.
Josh Triplett
[PATCH 2/2] Add url.<base>.pushInsteadOf: URL rewriting for push only
openbsd-misc
:
Taisto Qvist XX
Re: AMD GEODE LX-800 just works with kernel from install42.iso and kernelpanics wi...
Nico Meijer
Re: gOS Develop Kit with VIA pc-1 Processor Platform VIA C7-D
Andreas Bihlmaier
Re: jetway board sensors (Fintek F71805F)
admin
Drive a 2009 car from R799p/m
Antti Harri
Re: how to create a sha256 hash
Colocation donated by:
Syndicate