• Zhen Lei's avatar
    ARM: 9276/1: Refactor dump_instr() · 21d0798a
    Zhen Lei authored
    1. Rename local variable 'val16' to 'tmp'. So that the processing
       statements of thumb and arm can be aligned.
    2. Fix two sparse check warnings: (add __user for type conversion)
       warning: incorrect type in initializer (different address spaces)
          expected unsigned short [noderef] __user *register __p
          got unsigned short [usertype] *
    3. Prepare for the next patch to avoid repeated judgment.
       Before:
       if (!user_mode(regs)) {
               if (thumb)
               else
       } else {
               if (thumb)
               else
       }
    
       After:
       if (thumb) {
               if (user_mode(regs))
               else
       } else {
               if (user_mode(regs))
               else
       }
    Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
    Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
    21d0798a
traps.c 23.7 KB