[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210930071143.63410-12-wangkefeng.wang@huawei.com>
Date: Thu, 30 Sep 2021 15:11:43 +0800
From: Kefeng Wang <wangkefeng.wang@...wei.com>
To: <arnd@...db.de>, <linux-arch@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linuxppc-dev@...ts.ozlabs.org>,
<rostedt@...dmis.org>, <mingo@...hat.com>, <davem@...emloft.net>,
<ast@...nel.org>, <ryabinin.a.a@...il.com>,
<akpm@...ux-foundation.org>
CC: <mpe@...erman.id.au>, <benh@...nel.crashing.org>,
<paulus@...ba.org>, <bpf@...r.kernel.org>,
<linux-alpha@...r.kernel.org>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Kefeng Wang <wangkefeng.wang@...wei.com>,
Richard Henderson <rth@...ddle.net>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Matt Turner <mattst88@...il.com>
Subject: [PATCH v4 11/11] alpha: Use is_kernel_text() helper
Use is_kernel_text() helper to simplify code.
Cc: Richard Henderson <rth@...ddle.net>
Cc: Ivan Kokshaysky <ink@...assic.park.msu.ru>
Cc: Matt Turner <mattst88@...il.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
---
arch/alpha/kernel/traps.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c
index e805106409f7..2ae34702456c 100644
--- a/arch/alpha/kernel/traps.c
+++ b/arch/alpha/kernel/traps.c
@@ -129,9 +129,7 @@ dik_show_trace(unsigned long *sp, const char *loglvl)
extern char _stext[], _etext[];
unsigned long tmp = *sp;
sp++;
- if (tmp < (unsigned long) &_stext)
- continue;
- if (tmp >= (unsigned long) &_etext)
+ if (!is_kernel_text(tmp))
continue;
printk("%s[<%lx>] %pSR\n", loglvl, tmp, (void *)tmp);
if (i > 40) {
--
2.26.2
Powered by blists - more mailing lists