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.

Signed-off-by: Naveen Kumar Chaudhary <naveen.osdev@gmail.com>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
[ppavlu: correct the commit title]
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
This commit is contained in:
Naveen Kumar Chaudhary
2026-06-07 09:48:58 +05:30
committed by Petr Pavlu
parent 93c29ebd16
commit a3126c746d

View File

@@ -64,7 +64,7 @@ static void m_stop(struct seq_file *m, void *p)
static unsigned int module_total_size(struct module *mod)
{
int size = 0;
unsigned int size = 0;
for_each_mod_mem_type(type)
size += mod->mem[type].size;