Commit ac9284db authored by ye xingchen's avatar ye xingchen Committed by Huacai Chen

LoongArch: mm: Remove the unneeded result variable

Return the value pa_to_nid() directly instead of storing it in another
redundant variable.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 1a470ce4
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment