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>
This commit is contained in:
parent
1a470ce4e9
commit
ac9284db6b
1 changed files with 1 additions and 4 deletions
|
@ -146,10 +146,7 @@ void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap)
|
||||||
#ifdef CONFIG_NUMA
|
#ifdef CONFIG_NUMA
|
||||||
int memory_add_physaddr_to_nid(u64 start)
|
int memory_add_physaddr_to_nid(u64 start)
|
||||||
{
|
{
|
||||||
int nid;
|
return pa_to_nid(start);
|
||||||
|
|
||||||
nid = pa_to_nid(start);
|
|
||||||
return nid;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
|
EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue