sparc32: remove redundant memsets after memblock allocations
cover sparc32: remove redundant memsets after memblock allocations
memblock_alloc() and memblock_alloc_or_panic() return zeroed memory, so the memsets after the allocations are redundant.
Sang-Heon Jeon (2):
sparc32: remove redundant memset in arch_mm_preinit()
sparc32: remove redundant memset in srmmu_nocache_init()
arch/sparc/mm/init_32.c | 1 - arch/sparc/mm/srmmu.c | 1 - 2 files changed, 2 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/2 sparc32: remove redundant memset in arch_mm_preinit()
memblock_alloc() returns zeroed memory, so the memset after the allocation is redundant.
No functional change.
--- arch/sparc/mm/init_32.c | 1 - 1 file changed, 1 deletion(-)
arch/sparc/mm/init_32.c +0 -1
@@ -255,7 +255,6 @@ void __init arch_mm_preinit(void)prom_printf ("mem_init: Cannot alloc valid_addr_bitmap.\n" );prom_halt (); } -memset (sparc_valid_addr_bitmap,0 , i <<2 );taint_real_pages (); }
Signature · 1 line
2.43.0
Andreas Larsson
maintainerRe: [PATCH 1/2] sparc32: remove redundant memset in arch_mm_preinit()
Quoted 15 lines · Sang-Heon Jeon
memblock_alloc()returns zeroed memory, so the memset after the allocation is redundant.No functional change.
Signed-off-by Sang-Heon Jeon <[email protected]>--- arch/sparc/mm/init_32.c | 1 - 1 file changed, 1 deletion(-)arch/sparc/mm/init_32.c +0
-0
arch/sparc/mm/init_32.c void __init arch_mm_preinit(void) · line 260
Quoted 7 lines
arch/sparc/mm/init_32.c +0
-1@@ -255,7 +255,6 @@ void __init arch_mm_preinit(void)prom_printf ("mem_init: Cannot alloc valid_addr_bitmap.\n" );prom_halt (); } -memset (sparc_valid_addr_bitmap,0 , i <<2 );taint_real_pages (); }
No need for this anymore as this code is gone on my for-next thanks to commit 91c897e01883 ("sparc32: drop unused valid address bitmap").
Cheers,
Andreas
PATCH 2/2 sparc32: remove redundant memset in srmmu_nocache_init()
In reply to Sang-Heon Jeonmemblock_alloc_or_panic() returns zeroed memory, so the memset after the allocation is redundant.
No functional change.
--- arch/sparc/mm/srmmu.c | 1 - 1 file changed, 1 deletion(-)
arch/sparc/mm/srmmu.c +0 -1
@@ -279,7 +279,6 @@ static void __init srmmu_nocache_init(void) srmmu_nocache_pool =memblock_alloc_or_panic (srmmu_nocache_size,SRMMU_NOCACHE_ALIGN_MAX ); -memset (srmmu_nocache_pool,0 , srmmu_nocache_size); srmmu_nocache_bitmap = memblock_alloc_or_panic(BITS_TO_LONGS(bitmap_bits) * sizeof(long),
Signature · 1 line
2.43.0
Re: [PATCH 2/2] sparc32: remove redundant memset in srmmu_nocache_init()
Quoted 15 lines · Sang-Heon Jeon
memblock_alloc_or_panic()returns zeroed memory, so the memset after the allocation is redundant.No functional change.
Signed-off-by Sang-Heon Jeon <[email protected]>--- arch/sparc/mm/srmmu.c | 1 - 1 file changed, 1 deletion(-)arch/sparc/mm/srmmu.c +0
-0
arch/sparc/mm/srmmu.c static void __init srmmu_nocache_init(void) · line 284
Quoted 7 lines
arch/sparc/mm/srmmu.c +0
-1@@ -279,7 +279,6 @@ static void __init srmmu_nocache_init(void) srmmu_nocache_pool =memblock_alloc_or_panic (srmmu_nocache_size,SRMMU_NOCACHE_ALIGN_MAX ); -memset (srmmu_nocache_pool,0 , srmmu_nocache_size); srmmu_nocache_bitmap = memblock_alloc_or_panic(BITS_TO_LONGS(bitmap_bits) * sizeof(long),
Picking this up to my for-next.
Thanks,
Andreas