[2/6] nds32: use uaccess_kernel in show_regs
diff mbox series

Message ID 20200710135706.537715-3-hch@lst.de
State In Next
Commit cf8391c819163f9c3fe898cade3c2607f5d78788
Headers show
Series
  • [1/6] syscalls: use uaccess_kernel in addr_limit_user_check
Related show

Commit Message

Christoph Hellwig July 10, 2020, 1:57 p.m. UTC
Use the uaccess_kernel helper instead of duplicating it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/nds32/kernel/process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greentime Hu July 13, 2020, 10:02 a.m. UTC | #1
Christoph Hellwig <hch@lst.de> 於 2020年7月10日 週五 下午9:57寫道:
>
> Use the uaccess_kernel helper instead of duplicating it.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  arch/nds32/kernel/process.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/nds32/kernel/process.c b/arch/nds32/kernel/process.c
> index 9712fd474f2ca3..f06265949ec28b 100644
> --- a/arch/nds32/kernel/process.c
> +++ b/arch/nds32/kernel/process.c
> @@ -121,7 +121,7 @@ void show_regs(struct pt_regs *regs)
>                 regs->uregs[3], regs->uregs[2], regs->uregs[1], regs->uregs[0]);
>         pr_info("  IRQs o%s  Segment %s\n",
>                 interrupts_enabled(regs) ? "n" : "ff",
> -               segment_eq(get_fs(), KERNEL_DS)? "kernel" : "user");
> +               uaccess_kernel() ? "kernel" : "user");
>  }
>
>  EXPORT_SYMBOL(show_regs);

Hi Christoph, Thank you.
Acked-by: Greentime Hu <green.hu@gmail.com>

Patch
diff mbox series

diff --git a/arch/nds32/kernel/process.c b/arch/nds32/kernel/process.c
index 9712fd474f2ca3..f06265949ec28b 100644
--- a/arch/nds32/kernel/process.c
+++ b/arch/nds32/kernel/process.c
@@ -121,7 +121,7 @@  void show_regs(struct pt_regs *regs)
 		regs->uregs[3], regs->uregs[2], regs->uregs[1], regs->uregs[0]);
 	pr_info("  IRQs o%s  Segment %s\n",
 		interrupts_enabled(regs) ? "n" : "ff",
-		segment_eq(get_fs(), KERNEL_DS)? "kernel" : "user");
+		uaccess_kernel() ? "kernel" : "user");
 }
 
 EXPORT_SYMBOL(show_regs);