summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorNaveen Kumar Chaudhary <naveen.osdev@gmail.com>2026-06-07 09:48:58 +0530
committerPetr Pavlu <petr.pavlu@suse.com>2026-08-06 13:29:02 +0200
commita3126c746ddfe1cc3f6eee70475a33906e173ece (patch)
treef2a91c50b15c81758bb50741ccf1c0f6239e5e0d /kernel
parent93c29ebd1622fb0670701e1c1b3a978a5cac08b7 (diff)
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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/module/procfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/module/procfs.c b/kernel/module/procfs.c
index 0a4841e88adb..90712aa9dd13 100644
--- a/kernel/module/procfs.c
+++ b/kernel/module/procfs.c
@@ -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;