diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2012-07-27 08:31:12 (GMT) |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-07-30 09:03:12 (GMT) |
commit | 7d25617597ff8dcfe4d0e1d0ac9214e7cc7ded92 (patch) | |
tree | 5195733687b3194e053be0687137f6f6b05472e0 /arch/s390/kernel/dis.c | |
parent | 37fe1d73a449bdebc4908d04e518f5852d6c453b (diff) | |
download | linux-7d25617597ff8dcfe4d0e1d0ac9214e7cc7ded92.tar.xz |
s390: make use of user_mode() macro where possible
We use the user_mode() helper already at several places but also
have the open coded variant at other places.
Convert the code to always use the helper function.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/dis.c')
-rw-r--r-- | arch/s390/kernel/dis.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c index 1f6b428..619c5d3 100644 --- a/arch/s390/kernel/dis.c +++ b/arch/s390/kernel/dis.c @@ -1531,7 +1531,7 @@ static int print_insn(char *buffer, unsigned char *code, unsigned long addr) void show_code(struct pt_regs *regs) { - char *mode = (regs->psw.mask & PSW_MASK_PSTATE) ? "User" : "Krnl"; + char *mode = user_mode(regs) ? "User" : "Krnl"; unsigned char code[64]; char buffer[64], *ptr; mm_segment_t old_fs; @@ -1540,7 +1540,7 @@ void show_code(struct pt_regs *regs) /* Get a snapshot of the 64 bytes surrounding the fault address. */ old_fs = get_fs(); - set_fs((regs->psw.mask & PSW_MASK_PSTATE) ? USER_DS : KERNEL_DS); + set_fs(user_mode(regs) ? USER_DS : KERNEL_DS); for (start = 32; start && regs->psw.addr >= 34 - start; start -= 2) { addr = regs->psw.addr - 34 + start; if (__copy_from_user(code + start - 2, |