]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: ds.c ptrace.c integer as NULL pointer sparse fixes
authorHarvey Harrison <harvey.harrison@gmail.com>
Tue, 23 Sep 2008 21:56:44 +0000 (14:56 -0700)
committerIngo Molnar <mingo@elte.hu>
Wed, 24 Sep 2008 07:57:47 +0000 (09:57 +0200)
fix:

 arch/x86/kernel/ptrace.c:763:29: warning: Using plain integer as NULL pointer
 arch/x86/kernel/ptrace.c:777:46: warning: Using plain integer as NULL pointer
 arch/x86/kernel/ptrace.c:1115:45: warning: Using plain integer as NULL pointer
 arch/x86/kernel/ds.c:482:26: warning: Using plain integer as NULL pointer
 arch/x86/kernel/ds.c:487:25: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/ds.c
arch/x86/kernel/ptrace.c

index ab21c270bfa4c59f7f179310ff638db68d461c50..2b69994fd3a800458f4d81abbebad357405eac69 100644 (file)
@@ -479,12 +479,12 @@ static int ds_release(struct task_struct *task, enum ds_qualifier qual)
                goto out;
 
        kfree(context->buffer[qual]);
-       context->buffer[qual] = 0;
+       context->buffer[qual] = NULL;
 
        current->mm->total_vm  -= context->pages[qual];
        current->mm->locked_vm -= context->pages[qual];
        context->pages[qual] = 0;
-       context->owner[qual] = 0;
+       context->owner[qual] = NULL;
 
        /*
         * we put the context twice:
index ba19bb49bd097584239853ecdd220fd6c9d5e3aa..5df6093ac77682021d97df1680b7328855301837 100644 (file)
@@ -734,7 +734,7 @@ static int ptrace_bts_config(struct task_struct *child,
                goto errout;
 
        if (cfg.flags & PTRACE_BTS_O_ALLOC) {
-               ds_ovfl_callback_t ovfl = 0;
+               ds_ovfl_callback_t ovfl = NULL;
                unsigned int sig = 0;
 
                /* we ignore the error in case we were not tracing child */
@@ -748,7 +748,7 @@ static int ptrace_bts_config(struct task_struct *child,
                        ovfl = ptrace_bts_ovfl;
                }
 
-               error = ds_request_bts(child, /* base = */ 0, cfg.size, ovfl);
+               error = ds_request_bts(child, /* base = */ NULL, cfg.size, ovfl);
                if (error < 0)
                        goto errout;
 
@@ -1086,7 +1086,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                break;
 
        case PTRACE_BTS_SIZE:
-               ret = ds_get_bts_index(child, /* pos = */ 0);
+               ret = ds_get_bts_index(child, /* pos = */ NULL);
                break;
 
        case PTRACE_BTS_GET: