mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
kmemleak: Simplify the kmemleak_scan_area() function prototype
This function was taking non-necessary arguments which can be determined by kmemleak. The patch also modifies the calling sites. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
e7cb55b946
commit
c017b4be3e
4 changed files with 27 additions and 39 deletions
|
@ -2043,9 +2043,7 @@ static void kmemleak_load_module(struct module *mod, Elf_Ehdr *hdr,
|
|||
unsigned int i;
|
||||
|
||||
/* only scan the sections containing data */
|
||||
kmemleak_scan_area(mod->module_core, (unsigned long)mod -
|
||||
(unsigned long)mod->module_core,
|
||||
sizeof(struct module), GFP_KERNEL);
|
||||
kmemleak_scan_area(mod, sizeof(struct module), GFP_KERNEL);
|
||||
|
||||
for (i = 1; i < hdr->e_shnum; i++) {
|
||||
if (!(sechdrs[i].sh_flags & SHF_ALLOC))
|
||||
|
@ -2054,8 +2052,7 @@ static void kmemleak_load_module(struct module *mod, Elf_Ehdr *hdr,
|
|||
&& strncmp(secstrings + sechdrs[i].sh_name, ".bss", 4) != 0)
|
||||
continue;
|
||||
|
||||
kmemleak_scan_area(mod->module_core, sechdrs[i].sh_addr -
|
||||
(unsigned long)mod->module_core,
|
||||
kmemleak_scan_area((void *)sechdrs[i].sh_addr,
|
||||
sechdrs[i].sh_size, GFP_KERNEL);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue