[PATCH] LoongArch: undefine pr_define macro when it's appropriate

Enze Li posted 1 patch 2 years, 10 months ago
arch/loongarch/mm/tlb.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] LoongArch: undefine pr_define macro when it's appropriate
Posted by Enze Li 2 years, 10 months ago
There's a macro definition that is only used within the
output_pgtable_bits_defines function.  We don't need to spread this
macro elsewhere.  Therefore, it should be undefined when appropriate.

Signed-off-by: Enze Li <lienze@kylinos.cn>
---
 arch/loongarch/mm/tlb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/loongarch/mm/tlb.c b/arch/loongarch/mm/tlb.c
index 8bad6b0cff59..99f607afaf80 100644
--- a/arch/loongarch/mm/tlb.c
+++ b/arch/loongarch/mm/tlb.c
@@ -248,6 +248,7 @@ static void output_pgtable_bits_defines(void)
 	pr_define("_PAGE_NO_EXEC_SHIFT %d\n", _PAGE_NO_EXEC_SHIFT);
 	pr_define("_PFN_SHIFT %d\n", _PFN_SHIFT);
 	pr_debug("\n");
+#undef pr_define
 }
 
 #ifdef CONFIG_NUMA

base-commit: fc89d7fb499b0162e081f434d45e8d1b47e82ece
-- 
2.34.1