Now that module_enable_ro() has no more external users, make it static again.
Unified · Split
| @@ -858,12 +858,6 @@ extern int module_sysfs_initialized; · 857 unmodified lines | ||
| 858 | 858 | |
| 859 | 859 | #define __MODULE_STRING(x) __stringify(x) |
| 860 | 860 | |
| 861 | −#ifdef CONFIG_STRICT_MODULE_RWX | |
| 862 | −extern void module_enable_ro(const struct module *mod, bool after_init); | |
| 863 | −#else | |
| 864 | −static inline void module_enable_ro(const struct module *mod, bool after_init) { } | |
| 865 | −#endif | |
| 866 | − | |
| 867 | 861 | #ifdef CONFIG_GENERIC_BUG |
| 868 | 862 | void module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *, |
| 869 | 863 | struct module *); |
| @@ -1997,7 +1997,7 @@ static void frob_writable_data(const struct module_layout *layout, · 1996 unmodified lines | ||
| 1997 | 1997 | (layout->size - layout->ro_after_init_size) >> PAGE_SHIFT); |
| 1998 | 1998 | } |
| 1999 | 1999 | |
| 2000 | −void module_enable_ro(const struct module *mod, bool after_init) | |
| 2000 | +static void module_enable_ro(const struct module *mod, bool after_init) | |
| 2001 | 2001 | { |
| 2002 | 2002 | if (!rodata_enabled) |
| 2003 | 2003 | return; |
| @@ -2025,6 +2025,7 @@ static void module_enable_nx(const struct module *mod) · 21 unmodified lines | ||
| 2025 | 2025 | |
| 2026 | 2026 | #else /* !CONFIG_STRICT_MODULE_RWX */ |
| 2027 | 2027 | static void module_enable_nx(const struct module *mod) { } |
| 2028 | +static void module_enable_ro(const struct module *mod, bool after_init) {} | |
| 2028 | 2029 | #endif /* CONFIG_STRICT_MODULE_RWX */ |
| 2029 | 2030 | static void module_enable_x(const struct module *mod) |
| 2030 | 2031 | { |