It should now be rare to trigger this warning - it doesn't need to be so verbose. Make it follow the usual style in the module loading code. For the same reason, drop the dump_stack().
Unified · Split
| @@ -3115,13 +3115,9 @@ static noinline int do_init_module(struct module *mod) · 3114 unmodified lines | |||
| 3115 | 3115 | ||
| 3116 | goto fail_free_freeinit; | 3116 | goto fail_free_freeinit; |
| 3117 | } | 3117 | } |
| 3118 | if (ret > 0) { | 3118 | if (ret > 0) |
| 3119 | pr_warn("%s: '%s'->init suspiciously returned %d, it should " | 3119 | pr_warn("%s: init suspiciously returned %d, it should follow 0/-E convention\n", |
| 3120 | "follow 0/-E convention\n" | 3120 | mod->name, ret); |
| 3121 | "%s: loading module anyway...\n", | ||
| 3122 | __func__, mod->name, ret, __func__); | ||
| 3123 | dump_stack(); | ||
| 3124 | } | ||
| 3125 | 3121 | ||
| 3126 | /* Now it's a first class citizen! */ | 3122 | /* Now it's a first class citizen! */ |
| 3127 | mod->state = MODULE_STATE_LIVE; | 3123 | mod->state = MODULE_STATE_LIVE; |