Skip to content

Commit ac9284d

Browse files
ye xingchenchenhuacai
authored andcommitted
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>
1 parent 1a470ce commit ac9284d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

arch/loongarch/mm/init.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,7 @@ void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap)
146146
#ifdef CONFIG_NUMA
147147
int memory_add_physaddr_to_nid(u64 start)
148148
{
149-
int nid;
150-
151-
nid = pa_to_nid(start);
152-
return nid;
149+
return pa_to_nid(start);
153150
}
154151
EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
155152
#endif

0 commit comments

Comments
 (0)