]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
um: Make host_task_size a local variable
authorTiwei Bie <tiwei.btw@antgroup.com>
Mon, 27 Oct 2025 05:45:16 +0000 (13:45 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 27 Oct 2025 15:37:12 +0000 (16:37 +0100)
Currently, host_task_size is a global variable, but it is only used
in linux_main() to compute stub_start and task_size. Make it a local
variable to limit its scope to where it is actually needed.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Link: https://patch.msgid.link/20251027054519.1996090-2-tiwei.bie@linux.dev
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/include/shared/as-layout.h
arch/um/kernel/um_arch.c

index 7c7e17bce403dfc20ced4c8b43f96a4272f3f383..02ef258e3395e090a0367e343915c16a083ac917 100644 (file)
@@ -44,7 +44,6 @@ extern unsigned long start_vm;
 
 extern unsigned long brk_start;
 
-extern unsigned long host_task_size;
 extern unsigned long stub_start;
 
 extern int linux_main(int argc, char **argv, char **envp);
index ed2f67848a50e7d35306d6beda0fe439593e5082..4b14f1ea2690112bef80ad92d4b6e8bb26088139 100644 (file)
@@ -252,8 +252,6 @@ unsigned long stub_start;
 unsigned long task_size;
 EXPORT_SYMBOL(task_size);
 
-unsigned long host_task_size;
-
 unsigned long brk_start;
 unsigned long end_iomem;
 EXPORT_SYMBOL(end_iomem);
@@ -306,6 +304,7 @@ int __init linux_main(int argc, char **argv, char **envp)
 {
        unsigned long avail, diff;
        unsigned long virtmem_size, max_physmem;
+       unsigned long host_task_size;
        unsigned long stack;
        unsigned int i;
        int add;