[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1533326330-31677-6-git-send-email-rppt@linux.vnet.ibm.com>
Date: Fri, 3 Aug 2018 22:58:48 +0300
From: Mike Rapoport <rppt@...ux.vnet.ibm.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Richard Kuo <rkuo@...eaurora.org>, Ley Foon Tan <lftan@...era.com>,
Richard Weinberger <richard@....at>,
Guan Xuetao <gxt@....edu.cn>, Michal Hocko <mhocko@...nel.org>,
linux-hexagon@...r.kernel.org, nios2-dev@...ts.rocketboards.org,
linux-um@...ts.infradead.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Mike Rapoport <rppt@...ux.vnet.ibm.com>
Subject: [PATCH 5/7] um: setup_physmem: stop using global variables
The setup_physmem() function receives uml_physmem and uml_reserved as
parameters and still used these global variables. Replace such usage with
local variables.
Signed-off-by: Mike Rapoport <rppt@...ux.vnet.ibm.com>
Acked-by: Richard Weinberger <richard@....at>
---
arch/um/kernel/physmem.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c
index f02596e..0eaec0e 100644
--- a/arch/um/kernel/physmem.c
+++ b/arch/um/kernel/physmem.c
@@ -86,7 +86,7 @@ void __init setup_physmem(unsigned long start, unsigned long reserve_end,
long map_size;
int err;
- offset = uml_reserved - uml_physmem;
+ offset = reserve_end - start;
map_size = len - offset;
if(map_size <= 0) {
os_warn("Too few physical memory! Needed=%lu, given=%lu\n",
@@ -96,12 +96,12 @@ void __init setup_physmem(unsigned long start, unsigned long reserve_end,
physmem_fd = create_mem_file(len + highmem);
- err = os_map_memory((void *) uml_reserved, physmem_fd, offset,
+ err = os_map_memory((void *) reserve_end, physmem_fd, offset,
map_size, 1, 1, 1);
if (err < 0) {
os_warn("setup_physmem - mapping %ld bytes of memory at 0x%p "
"failed - errno = %d\n", map_size,
- (void *) uml_reserved, err);
+ (void *) reserve_end, err);
exit(1);
}
--
2.7.4
Powered by blists - more mailing lists