lkml.org 
[lkml]   [2010]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC PATCH 10/43] ptrace, avr32: cleanup arch_ptrace()
    Date
    use new 'datap' variable type of void pointer in order to remove unnecessary
    castings.

    Signed-off-by: Namhyung Kim <namhyung@gmail.com>
    Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
    ---
    arch/avr32/kernel/ptrace.c | 8 ++++----
    1 files changed, 4 insertions(+), 4 deletions(-)

    diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c
    index ecea9b6..4aedcab 100644
    --- a/arch/avr32/kernel/ptrace.c
    +++ b/arch/avr32/kernel/ptrace.c
    @@ -150,6 +150,7 @@ long arch_ptrace(struct task_struct *child, long request,
    unsigned long addr, unsigned long data)
    {
    int ret;
    + void __user *datap = (void __user *) data;

    switch (request) {
    /* Read the word at location addr in the child process */
    @@ -159,8 +160,7 @@ long arch_ptrace(struct task_struct *child, long request,
    break;

    case PTRACE_PEEKUSR:
    - ret = ptrace_read_user(child, addr,
    - (unsigned long __user *)data);
    + ret = ptrace_read_user(child, addr, datap);
    break;

    /* Write the word in data at location addr */
    @@ -174,11 +174,11 @@ long arch_ptrace(struct task_struct *child, long request,
    break;

    case PTRACE_GETREGS:
    - ret = ptrace_getregs(child, (void __user *)data);
    + ret = ptrace_getregs(child, datap);
    break;

    case PTRACE_SETREGS:
    - ret = ptrace_setregs(child, (const void __user *)data);
    + ret = ptrace_setregs(child, datap);
    break;

    default:
    --
    1.7.2.2


    \
     
     \ /
      Last update: 2010-08-27 11:45    [W:0.020 / U:33.884 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site