aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeunghun Lee <waydi1@gmail.com>2014-01-15 18:48:49 -0500
committerRusty Russell <rusty@rustcorp.com.au>2014-01-15 18:53:03 -0500
commite865d06b1798746b85340777332b0e6f50e95ab7 (patch)
tree7225bbd3f7b808587a162e4a41f339e3a5cb4288
parent7b4ec8dd7d4ac467e9eee4d49f2c9574d773efbb (diff)
module: fix coding style
Fix coding style of module.h Signed-off-by: Seunghun Lee <waydi1@gmail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r--include/linux/module.h62
1 files changed, 31 insertions, 31 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index 46e548fd502a..eaf60ff9ba94 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -29,8 +29,7 @@
29 29
30#define MODULE_NAME_LEN MAX_PARAM_PREFIX_LEN 30#define MODULE_NAME_LEN MAX_PARAM_PREFIX_LEN
31 31
32struct modversion_info 32struct modversion_info {
33{
34 unsigned long crc; 33 unsigned long crc;
35 char name[MODULE_NAME_LEN]; 34 char name[MODULE_NAME_LEN];
36}; 35};
@@ -84,12 +83,12 @@ void sort_main_extable(void);
84void trim_init_extable(struct module *m); 83void trim_init_extable(struct module *m);
85 84
86#ifdef MODULE 85#ifdef MODULE
87#define MODULE_GENERIC_TABLE(gtype,name) \ 86#define MODULE_GENERIC_TABLE(gtype, name) \
88extern const struct gtype##_id __mod_##gtype##_table \ 87extern const struct gtype##_id __mod_##gtype##_table \
89 __attribute__ ((unused, alias(__stringify(name)))) 88 __attribute__ ((unused, alias(__stringify(name))))
90 89
91#else /* !MODULE */ 90#else /* !MODULE */
92#define MODULE_GENERIC_TABLE(gtype,name) 91#define MODULE_GENERIC_TABLE(gtype, name)
93#endif 92#endif
94 93
95/* Generic info of form tag = "info" */ 94/* Generic info of form tag = "info" */
@@ -126,7 +125,7 @@ extern const struct gtype##_id __mod_##gtype##_table \
126 * is a GPL combined work. 125 * is a GPL combined work.
127 * 126 *
128 * This exists for several reasons 127 * This exists for several reasons
129 * 1. So modinfo can show license info for users wanting to vet their setup 128 * 1. So modinfo can show license info for users wanting to vet their setup
130 * is free 129 * is free
131 * 2. So the community can ignore bug reports including proprietary modules 130 * 2. So the community can ignore bug reports including proprietary modules
132 * 3. So vendors can do likewise based on their own policies 131 * 3. So vendors can do likewise based on their own policies
@@ -138,27 +137,29 @@ extern const struct gtype##_id __mod_##gtype##_table \
138 * authors use multiple MODULE_AUTHOR() statements/lines. 137 * authors use multiple MODULE_AUTHOR() statements/lines.
139 */ 138 */
140#define MODULE_AUTHOR(_author) MODULE_INFO(author, _author) 139#define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
141 140
142/* What your module does. */ 141/* What your module does. */
143#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description) 142#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
144 143
145#define MODULE_DEVICE_TABLE(type,name) \ 144#define MODULE_DEVICE_TABLE(type, name) \
146 MODULE_GENERIC_TABLE(type##_device,name) 145 MODULE_GENERIC_TABLE(type##_device, name)
147 146
148/* Version of form [<epoch>:]<version>[-<extra-version>]. 147/* Version of form [<epoch>:]<version>[-<extra-version>].
149 Or for CVS/RCS ID version, everything but the number is stripped. 148 * Or for CVS/RCS ID version, everything but the number is stripped.
150 <epoch>: A (small) unsigned integer which allows you to start versions 149 * <epoch>: A (small) unsigned integer which allows you to start versions
151 anew. If not mentioned, it's zero. eg. "2:1.0" is after 150 * anew. If not mentioned, it's zero. eg. "2:1.0" is after
152 "1:2.0". 151 * "1:2.0".
153 <version>: The <version> may contain only alphanumerics and the 152
154 character `.'. Ordered by numeric sort for numeric parts, 153 * <version>: The <version> may contain only alphanumerics and the
155 ascii sort for ascii parts (as per RPM or DEB algorithm). 154 * character `.'. Ordered by numeric sort for numeric parts,
156 <extraversion>: Like <version>, but inserted for local 155 * ascii sort for ascii parts (as per RPM or DEB algorithm).
157 customizations, eg "rh3" or "rusty1". 156
158 157 * <extraversion>: Like <version>, but inserted for local
159 Using this automatically adds a checksum of the .c files and the 158 * customizations, eg "rh3" or "rusty1".
160 local headers in "srcversion". 159
161*/ 160 * Using this automatically adds a checksum of the .c files and the
161 * local headers in "srcversion".
162 */
162 163
163#if defined(MODULE) || !defined(CONFIG_SYSFS) 164#if defined(MODULE) || !defined(CONFIG_SYSFS)
164#define MODULE_VERSION(_version) MODULE_INFO(version, _version) 165#define MODULE_VERSION(_version) MODULE_INFO(version, _version)
@@ -226,8 +227,7 @@ struct module_ref {
226 unsigned long decs; 227 unsigned long decs;
227} __attribute((aligned(2 * sizeof(unsigned long)))); 228} __attribute((aligned(2 * sizeof(unsigned long))));
228 229
229struct module 230struct module {
230{
231 enum module_state state; 231 enum module_state state;
232 232
233 /* Member of list of modules */ 233 /* Member of list of modules */
@@ -480,8 +480,8 @@ static inline void module_put(struct module *module)
480static inline void __module_get(struct module *module) 480static inline void __module_get(struct module *module)
481{ 481{
482} 482}
483#define symbol_put(x) do { } while(0) 483#define symbol_put(x) do { } while (0)
484#define symbol_put_addr(p) do { } while(0) 484#define symbol_put_addr(p) do { } while (0)
485 485
486#endif /* CONFIG_MODULE_UNLOAD */ 486#endif /* CONFIG_MODULE_UNLOAD */
487int ref_module(struct module *a, struct module *b); 487int ref_module(struct module *a, struct module *b);
@@ -507,8 +507,8 @@ int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size, unsigned
507/* For extable.c to search modules' exception tables. */ 507/* For extable.c to search modules' exception tables. */
508const struct exception_table_entry *search_module_extables(unsigned long addr); 508const struct exception_table_entry *search_module_extables(unsigned long addr);
509 509
510int register_module_notifier(struct notifier_block * nb); 510int register_module_notifier(struct notifier_block *nb);
511int unregister_module_notifier(struct notifier_block * nb); 511int unregister_module_notifier(struct notifier_block *nb);
512 512
513extern void print_modules(void); 513extern void print_modules(void);
514 514
@@ -548,8 +548,8 @@ static inline bool is_module_text_address(unsigned long addr)
548 548
549/* Get/put a kernel symbol (calls should be symmetric) */ 549/* Get/put a kernel symbol (calls should be symmetric) */
550#define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); }) 550#define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); })
551#define symbol_put(x) do { } while(0) 551#define symbol_put(x) do { } while (0)
552#define symbol_put_addr(x) do { } while(0) 552#define symbol_put_addr(x) do { } while (0)
553 553
554static inline void __module_get(struct module *module) 554static inline void __module_get(struct module *module)
555{ 555{
@@ -606,13 +606,13 @@ static inline int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
606 return 0; 606 return 0;
607} 607}
608 608
609static inline int register_module_notifier(struct notifier_block * nb) 609static inline int register_module_notifier(struct notifier_block *nb)
610{ 610{
611 /* no events will happen anyway, so this can always succeed */ 611 /* no events will happen anyway, so this can always succeed */
612 return 0; 612 return 0;
613} 613}
614 614
615static inline int unregister_module_notifier(struct notifier_block * nb) 615static inline int unregister_module_notifier(struct notifier_block *nb)
616{ 616{
617 return 0; 617 return 0;
618} 618}