From: ye xingchen Date: Fri, 26 Aug 2022 07:29:03 +0000 (+0000) Subject: LoongArch: mm: Remove the unneeded result variable X-Git-Tag: v6.6.17~6669^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac9284db6b7b4af150940186b633a233d4ca2bed;p=platform%2Fkernel%2Flinux-rpi.git 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 --- diff --git a/arch/loongarch/mm/init.c b/arch/loongarch/mm/init.c index 3c3fbff..0532ed5 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