]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
modules: no need to align .modinfo strings
authorJan Beulich <JBeulich@novell.com>
Tue, 26 Oct 2010 21:22:26 +0000 (14:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Oct 2010 23:52:13 +0000 (16:52 -0700)
gcc aligns strings as a performance consideration for those cases where
strings are being used a lot.

Their use is not performance critical, and hence it seems better to save
some space.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/moduleparam.h

index 9d2f1837b3d8615e64395157c06f993dff16468e..112adf8bd47dd2c1d13800577f340d6cfa9c0b46 100644 (file)
@@ -21,8 +21,8 @@
 #define __module_cat(a,b) ___module_cat(a,b)
 #define __MODULE_INFO(tag, name, info)                                   \
 static const char __module_cat(name,__LINE__)[]                                  \
-  __used                                                                 \
-  __attribute__((section(".modinfo"),unused)) = __stringify(tag) "=" info
+  __used __attribute__((section(".modinfo"), unused, aligned(1)))        \
+  = __stringify(tag) "=" info
 #else  /* !MODULE */
 #define __MODULE_INFO(tag, name, info)
 #endif