From ac9284db6b7b4af150940186b633a233d4ca2bed Mon Sep 17 00:00:00 2001 From: ye xingchen Date: Fri, 26 Aug 2022 07:29:03 +0000 Subject: [PATCH] LoongArch: mm: Remove the unneeded result variable Return the value pa_to_nid() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen Signed-off-by: Huacai Chen --- arch/loongarch/mm/init.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/loongarch/mm/init.c b/arch/loongarch/mm/init.c index 3c3fbff0b8f86..0532ed5ba43de 100644 --- a/arch/loongarch/mm/init.c +++ b/arch/loongarch/mm/init.c @@ -146,10 +146,7 @@ void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) #ifdef CONFIG_NUMA int memory_add_physaddr_to_nid(u64 start) { - int nid; - - nid = pa_to_nid(start); - return nid; + return pa_to_nid(start); } EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); #endif -- 2.39.5