module: make module_memory_{alloc,free} more self-contained
authorMike Rapoport (IBM) <rppt@kernel.org>
Sun, 5 May 2024 16:06:17 +0000 (19:06 +0300)
committerLuis Chamberlain <mcgrof@kernel.org>
Tue, 14 May 2024 07:31:43 +0000 (00:31 -0700)
commitbc6b94d3ea062454ca889884db99e145efffcb93
treecb156685ff852ab32fad1983a8b748c9aa2e0f61
parente8dbc6a87580d00a4746fbe1e7167e988d3061bc
module: make module_memory_{alloc,free} more self-contained

Move the logic related to the memory allocation and freeing into
module_memory_alloc() and module_memory_free().

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Acked-by: Song Liu <song@kernel.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
kernel/module/main.c