aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorKevin Winchester <kjwinchester@gmail.com>2012-01-15 18:32:55 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-15 19:21:07 -0500
commit53999bf34d55981328f8ba9def558d3e104d6e36 (patch)
tree4ca98169e5c96c1ec8e04d15fce75c60a8b9578d /kernel/module.c
parent122804ecb59493fbb4d31b3ba9ac59faaf45276f (diff)
error: implicit declaration of function 'module_flags_taint'
Recent changes to kernel/module.c caused the following compile error: kernel/module.c: In function ‘show_taint’: kernel/module.c:1024:2: error: implicit declaration of function ‘module_flags_taint’ [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors Correct this error by moving the definition of module_flags_taint outside of the #ifdef CONFIG_MODULE_UNLOAD section. Signed-off-by: Kevin Winchester <kjwinchester@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/kernel/module.c b/kernel/module.c
index acf6ed3ebe81..2c932760fd33 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -842,26 +842,6 @@ out:
842 return ret; 842 return ret;
843} 843}
844 844
845static size_t module_flags_taint(struct module *mod, char *buf)
846{
847 size_t l = 0;
848
849 if (mod->taints & (1 << TAINT_PROPRIETARY_MODULE))
850 buf[l++] = 'P';
851 if (mod->taints & (1 << TAINT_OOT_MODULE))
852 buf[l++] = 'O';
853 if (mod->taints & (1 << TAINT_FORCED_MODULE))
854 buf[l++] = 'F';
855 if (mod->taints & (1 << TAINT_CRAP))
856 buf[l++] = 'C';
857 /*
858 * TAINT_FORCED_RMMOD: could be added.
859 * TAINT_UNSAFE_SMP, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't
860 * apply to modules.
861 */
862 return l;
863}
864
865static inline void print_unload_info(struct seq_file *m, struct module *mod) 845static inline void print_unload_info(struct seq_file *m, struct module *mod)
866{ 846{
867 struct module_use *use; 847 struct module_use *use;
@@ -962,6 +942,26 @@ static inline int module_unload_init(struct module *mod)
962} 942}
963#endif /* CONFIG_MODULE_UNLOAD */ 943#endif /* CONFIG_MODULE_UNLOAD */
964 944
945static size_t module_flags_taint(struct module *mod, char *buf)
946{
947 size_t l = 0;
948
949 if (mod->taints & (1 << TAINT_PROPRIETARY_MODULE))
950 buf[l++] = 'P';
951 if (mod->taints & (1 << TAINT_OOT_MODULE))
952 buf[l++] = 'O';
953 if (mod->taints & (1 << TAINT_FORCED_MODULE))
954 buf[l++] = 'F';
955 if (mod->taints & (1 << TAINT_CRAP))
956 buf[l++] = 'C';
957 /*
958 * TAINT_FORCED_RMMOD: could be added.
959 * TAINT_UNSAFE_SMP, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't
960 * apply to modules.
961 */
962 return l;
963}
964
965static ssize_t show_initstate(struct module_attribute *mattr, 965static ssize_t show_initstate(struct module_attribute *mattr,
966 struct module_kobject *mk, char *buffer) 966 struct module_kobject *mk, char *buffer)
967{ 967{