]> git.baikalelectronics.ru Git - kernel.git/commitdiff
alpha: use is_kernel_text() helper
authorKefeng Wang <wangkefeng.wang@huawei.com>
Tue, 9 Nov 2021 02:34:20 +0000 (18:34 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Nov 2021 18:02:51 +0000 (10:02 -0800)
Use is_kernel_text() helper to simplify code.

Link: https://lkml.kernel.org/r/20210930071143.63410-12-wangkefeng.wang@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/alpha/kernel/traps.c

index e805106409f76c5693262df81f470092b10abeb8..2ae34702456cd581506ede6c196b40ed4818531b 100644 (file)
@@ -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) {