diff options
author | ye xingchen <ye.xingchen@zte.com.cn> | 2022-08-26 10:29:03 +0300 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2022-09-03 13:01:27 +0300 |
commit | ac9284db6b7b4af150940186b633a233d4ca2bed (patch) | |
tree | 9e79521bf1587650f5ed056d83e42c6c04704604 | |
parent | 1a470ce4e9106cc4c3c0edfb2e213dcbb7224dc4 (diff) | |
download | linux-ac9284db6b7b4af150940186b633a233d4ca2bed.tar.xz |
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 <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
-rw-r--r-- | arch/loongarch/mm/init.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/loongarch/mm/init.c b/arch/loongarch/mm/init.c index 3c3fbff0b8f8..0532ed5ba43d 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 |