Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/debug: remove module_exit function / move EXPORT_SYMBOLs

debug.c is not a module, so remove the module_exit function, since it
will never be called.
Also move the EXPORT_SYMBOL statements to the functions they belong to.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Heiko Carstens and committed by
Martin Schwidefsky
d5274369 bdc0077a

+23 -47
+23 -47
arch/s390/kernel/debug.c
··· 110 110 NULL, 111 111 NULL 112 112 }; 113 + EXPORT_SYMBOL(debug_raw_view); 113 114 114 115 struct debug_view debug_hex_ascii_view = { 115 116 "hex_ascii", ··· 120 119 NULL, 121 120 NULL 122 121 }; 122 + EXPORT_SYMBOL(debug_hex_ascii_view); 123 123 124 124 static struct debug_view debug_level_view = { 125 125 "level", ··· 157 155 NULL, 158 156 NULL 159 157 }; 158 + EXPORT_SYMBOL(debug_sprintf_view); 160 159 161 160 /* used by dump analysis tools to determine version of debug feature */ 162 161 static unsigned int __used debug_feature_version = __DEBUG_FEATURE_VERSION; ··· 733 730 return debug_register_mode(name, pages_per_area, nr_areas, buf_size, 734 731 S_IRUSR | S_IWUSR, 0, 0); 735 732 } 733 + EXPORT_SYMBOL(debug_register); 736 734 737 735 /* 738 736 * debug_unregister: ··· 752 748 out: 753 749 return; 754 750 } 751 + EXPORT_SYMBOL(debug_unregister); 755 752 756 753 /* 757 754 * debug_set_size: ··· 815 810 } 816 811 spin_unlock_irqrestore(&id->lock,flags); 817 812 } 818 - 813 + EXPORT_SYMBOL(debug_set_level); 819 814 820 815 /* 821 816 * proceed_active_entry: ··· 935 930 if (debug_stoppable) 936 931 debug_active = 0; 937 932 } 938 - 933 + EXPORT_SYMBOL(debug_stop_all); 939 934 940 935 void debug_set_critical(void) 941 936 { ··· 968 963 969 964 return active; 970 965 } 966 + EXPORT_SYMBOL(debug_event_common); 971 967 972 968 /* 973 969 * debug_exception_common: ··· 996 990 997 991 return active; 998 992 } 993 + EXPORT_SYMBOL(debug_exception_common); 999 994 1000 995 /* 1001 996 * counts arguments in format string for sprintf view ··· 1050 1043 1051 1044 return active; 1052 1045 } 1046 + EXPORT_SYMBOL(debug_sprintf_event); 1053 1047 1054 1048 /* 1055 1049 * debug_sprintf_exception: ··· 1089 1081 1090 1082 return active; 1091 1083 } 1092 - 1093 - /* 1094 - * debug_init: 1095 - * - is called exactly once to initialize the debug feature 1096 - */ 1097 - 1098 - static int 1099 - __init debug_init(void) 1100 - { 1101 - int rc = 0; 1102 - 1103 - s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table); 1104 - mutex_lock(&debug_mutex); 1105 - debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT,NULL); 1106 - initialized = 1; 1107 - mutex_unlock(&debug_mutex); 1108 - 1109 - return rc; 1110 - } 1084 + EXPORT_SYMBOL(debug_sprintf_exception); 1111 1085 1112 1086 /* 1113 1087 * debug_register_view: ··· 1137 1147 out: 1138 1148 return rc; 1139 1149 } 1150 + EXPORT_SYMBOL(debug_register_view); 1140 1151 1141 1152 /* 1142 1153 * debug_unregister_view: ··· 1167 1176 out: 1168 1177 return rc; 1169 1178 } 1179 + EXPORT_SYMBOL(debug_unregister_view); 1170 1180 1171 1181 static inline char * 1172 1182 debug_get_user_string(const char __user *user_buf, size_t user_len) ··· 1477 1485 except_str, entry->id.fields.cpuid, (void *) caller); 1478 1486 return rc; 1479 1487 } 1488 + EXPORT_SYMBOL(debug_dflt_header_fn); 1480 1489 1481 1490 /* 1482 1491 * prints debug data sprintf-formated: ··· 1526 1533 } 1527 1534 1528 1535 /* 1529 - * clean up module 1536 + * debug_init: 1537 + * - is called exactly once to initialize the debug feature 1530 1538 */ 1531 - static void __exit debug_exit(void) 1539 + static int __init debug_init(void) 1532 1540 { 1533 - debugfs_remove(debug_debugfs_root_entry); 1534 - unregister_sysctl_table(s390dbf_sysctl_header); 1535 - return; 1541 + s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table); 1542 + mutex_lock(&debug_mutex); 1543 + debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT, NULL); 1544 + initialized = 1; 1545 + mutex_unlock(&debug_mutex); 1546 + return 0; 1536 1547 } 1537 - 1538 - /* 1539 - * module definitions 1540 - */ 1541 1548 postcore_initcall(debug_init); 1542 - module_exit(debug_exit); 1543 - MODULE_LICENSE("GPL"); 1544 - 1545 - EXPORT_SYMBOL(debug_register); 1546 - EXPORT_SYMBOL(debug_unregister); 1547 - EXPORT_SYMBOL(debug_set_level); 1548 - EXPORT_SYMBOL(debug_stop_all); 1549 - EXPORT_SYMBOL(debug_register_view); 1550 - EXPORT_SYMBOL(debug_unregister_view); 1551 - EXPORT_SYMBOL(debug_event_common); 1552 - EXPORT_SYMBOL(debug_exception_common); 1553 - EXPORT_SYMBOL(debug_hex_ascii_view); 1554 - EXPORT_SYMBOL(debug_raw_view); 1555 - EXPORT_SYMBOL(debug_dflt_header_fn); 1556 - EXPORT_SYMBOL(debug_sprintf_view); 1557 - EXPORT_SYMBOL(debug_sprintf_exception); 1558 - EXPORT_SYMBOL(debug_sprintf_event);