* [PATCH] x86: ds.c ptrace.c integer as NULL pointer sparse fixes
@ 2008-09-23 21:56 Harvey Harrison
2008-09-24 4:56 ` Cyrill Gorcunov
2008-09-24 7:58 ` Ingo Molnar
0 siblings, 2 replies; 3+ messages in thread
From: Harvey Harrison @ 2008-09-23 21:56 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Cyrill Gorcunov, LKML
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>
---
arch/x86/kernel/ds.c | 4 ++--
arch/x86/kernel/ptrace.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c
index ab21c27..2b69994 100644
--- a/arch/x86/kernel/ds.c
+++ b/arch/x86/kernel/ds.c
@@ -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:
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 42801a5..4e1ef66 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -760,7 +760,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 */
@@ -774,7 +774,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;
@@ -1112,7 +1112,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:
--
1.6.0.2.471.g47a76
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] x86: ds.c ptrace.c integer as NULL pointer sparse fixes
2008-09-23 21:56 [PATCH] x86: ds.c ptrace.c integer as NULL pointer sparse fixes Harvey Harrison
@ 2008-09-24 4:56 ` Cyrill Gorcunov
2008-09-24 7:58 ` Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: Cyrill Gorcunov @ 2008-09-24 4:56 UTC (permalink / raw)
To: Harvey Harrison; +Cc: Ingo Molnar, LKML
[Harvey Harrison - Tue, Sep 23, 2008 at 02:56:44PM -0700]
| 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>
| ---
| arch/x86/kernel/ds.c | 4 ++--
| arch/x86/kernel/ptrace.c | 6 +++---
| 2 files changed, 5 insertions(+), 5 deletions(-)
|
| diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c
| index ab21c27..2b69994 100644
| --- a/arch/x86/kernel/ds.c
| +++ b/arch/x86/kernel/ds.c
| @@ -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:
| diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
| index 42801a5..4e1ef66 100644
| --- a/arch/x86/kernel/ptrace.c
| +++ b/arch/x86/kernel/ptrace.c
| @@ -760,7 +760,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 */
| @@ -774,7 +774,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;
|
| @@ -1112,7 +1112,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:
| --
| 1.6.0.2.471.g47a76
|
|
|
Looks good for me, thanks Harvey!
Feel free to add (if needed)
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
- Cyrill -
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86: ds.c ptrace.c integer as NULL pointer sparse fixes
2008-09-23 21:56 [PATCH] x86: ds.c ptrace.c integer as NULL pointer sparse fixes Harvey Harrison
2008-09-24 4:56 ` Cyrill Gorcunov
@ 2008-09-24 7:58 ` Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2008-09-24 7:58 UTC (permalink / raw)
To: Harvey Harrison; +Cc: Cyrill Gorcunov, LKML, Metzger, Markus T, Roland McGrath
* Harvey Harrison <harvey.harrison@gmail.com> wrote:
> 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>
>
> ---
> arch/x86/kernel/ds.c | 4 ++--
> arch/x86/kernel/ptrace.c | 6 +++---
> 2 files changed, 5 insertions(+), 5 deletions(-)
applied to tip/x86/pebs, thanks Harvey!
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-24 7:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-23 21:56 [PATCH] x86: ds.c ptrace.c integer as NULL pointer sparse fixes Harvey Harrison
2008-09-24 4:56 ` Cyrill Gorcunov
2008-09-24 7:58 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox