History

module: procfs: use matching type for accumulator in module_total_size()

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.

Naveen Kumar Chaudhary committed 5 months ago

Commit a3126c71 parent 93c29eb1 file · +1 −1Browse files

Showing the changes to kernel/module (1 of 1 file). Show all

Unified · Split

kernel/module/procfs.c+1−1
@@ -64,7 +64,7 @@ static void m_stop(struct seq_file *m, void *p) · 63 unmodified lines
64 64
65static unsigned int module_total_size(struct module *mod)65static 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;