module_total_size() returns unsigned int but uses a signed int accumulator. While the result is numerically correct, the type mismatch is misleading. Change the accumulator to unsigned int to match the return type.
Showing the changes to kernel/module (1 of 1 file). Show all
Unified · Split
| @@ -64,7 +64,7 @@ static void m_stop(struct seq_file *m, void *p) · 63 unmodified lines | |||
| 64 | 64 | ||
| 65 | static unsigned int module_total_size(struct module *mod) | 65 | static unsigned int module_total_size(struct module *mod) |
| 66 | { | 66 | { |
| 67 | int size = 0; | 67 | unsigned int size = 0; |
| 68 | 68 | ||
| 69 | for_each_mod_mem_type(type) | 69 | for_each_mod_mem_type(type) |
| 70 | size += mod->mem[type].size; | 70 | size += mod->mem[type].size; |