mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 14:33:24 -04:00
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:
committed by
Petr Pavlu
parent
93c29ebd16
commit
a3126c746d
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user