diff options
| author | Mike Rapoport <[email protected]> | 2021-11-05 20:43:22 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2021-11-06 20:30:41 +0000 |
| commit | 4421cca0a3e4833b3bf0f20de98eb580ab8c7290 (patch) | |
| tree | 82c77d76bbd854c45bb63746becc216d1b775fde /arch/x86/mm/numa.c | |
| parent | memblock: rename memblock_free to memblock_phys_free (diff) | |
| download | kernel-4421cca0a3e4833b3bf0f20de98eb580ab8c7290.tar.gz kernel-4421cca0a3e4833b3bf0f20de98eb580ab8c7290.zip | |
memblock: use memblock_free for freeing virtual pointers
Rename memblock_free_ptr() to memblock_free() and use memblock_free()
when freeing a virtual pointer so that memblock_free() will be a
counterpart of memblock_alloc()
The callers are updated with the below semantic patch and manual
addition of (void *) casting to pointers that are represented by
unsigned long variables.
@@
identifier vaddr;
expression size;
@@
(
- memblock_phys_free(__pa(vaddr), size);
+ memblock_free(vaddr, size);
|
- memblock_free_ptr(vaddr, size);
+ memblock_free(vaddr, size);
)
[[email protected]: fixup]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Mike Rapoport <[email protected]>
Signed-off-by: Stephen Rothwell <[email protected]>
Cc: Christophe Leroy <[email protected]>
Cc: Juergen Gross <[email protected]>
Cc: Shahab Vahedi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'arch/x86/mm/numa.c')
| -rw-r--r-- | arch/x86/mm/numa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index 1e9b93b088db..c6b1213086d6 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@ -355,7 +355,7 @@ void __init numa_reset_distance(void) /* numa_distance could be 1LU marking allocation failure, test cnt */ if (numa_distance_cnt) - memblock_free_ptr(numa_distance, size); + memblock_free(numa_distance, size); numa_distance_cnt = 0; numa_distance = NULL; /* enable table creation */ } |
