* [PATCH 2/4] kernel/test_kprobes.c: fix "integer as NULL pointer" warning.
2010-01-24 16:03 [PATCH 1/4] kernel/kfifo.c: fix "interger as NULL pointer" warning Thiago Farina
@ 2010-01-24 16:03 ` Thiago Farina
2010-01-24 16:03 ` [PATCH 3/4] trace/trace_output.c: " Thiago Farina
` (2 subsequent siblings)
3 siblings, 0 replies; 13+ messages in thread
From: Thiago Farina @ 2010-01-24 16:03 UTC (permalink / raw)
To: tfransosi; +Cc: linux-kernel
kernel/test_kprobes.c:118:19: warning: Using plain integer as NULL pointer
kernel/test_kprobes.c:213:22: warning: Using plain integer as NULL pointer
kernel/test_kprobes.c:326:22: warning: Using plain integer as NULL pointer
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
---
kernel/test_kprobes.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/test_kprobes.c b/kernel/test_kprobes.c
index 4f10451..9a43351 100644
--- a/kernel/test_kprobes.c
+++ b/kernel/test_kprobes.c
@@ -115,7 +115,7 @@ static int test_kprobes(void)
int ret;
struct kprobe *kps[2] = {&kp, &kp2};
- kp.addr = 0; /* addr should be cleard for reusing kprobe. */
+ kp.addr = NULL; /* addr should be cleard for reusing kprobe. */
ret = register_kprobes(kps, 2);
if (ret < 0) {
printk(KERN_ERR "Kprobe smoke test failed: "
@@ -210,7 +210,7 @@ static int test_jprobes(void)
int ret;
struct jprobe *jps[2] = {&jp, &jp2};
- jp.kp.addr = 0; /* addr should be cleard for reusing kprobe. */
+ jp.kp.addr = NULL; /* addr should be cleard for reusing kprobe. */
ret = register_jprobes(jps, 2);
if (ret < 0) {
printk(KERN_ERR "Kprobe smoke test failed: "
@@ -323,7 +323,7 @@ static int test_kretprobes(void)
int ret;
struct kretprobe *rps[2] = {&rp, &rp2};
- rp.kp.addr = 0; /* addr should be cleard for reusing kprobe. */
+ rp.kp.addr = NULL; /* addr should be cleard for reusing kprobe. */
ret = register_kretprobes(rps, 2);
if (ret < 0) {
printk(KERN_ERR "Kprobe smoke test failed: "
--
1.6.6.1.383.g5a9f
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 3/4] trace/trace_output.c: fix "integer as NULL pointer" warning.
2010-01-24 16:03 [PATCH 1/4] kernel/kfifo.c: fix "interger as NULL pointer" warning Thiago Farina
2010-01-24 16:03 ` [PATCH 2/4] kernel/test_kprobes.c: fix "integer " Thiago Farina
@ 2010-01-24 16:03 ` Thiago Farina
2010-01-25 21:40 ` Steven Rostedt
2010-05-07 18:40 ` [tip:tracing/core] tracing: Fix " tip-bot for Thiago Farina
2010-01-24 16:03 ` [PATCH 4/4] mm/memcontrol.c: fix " Thiago Farina
2010-01-24 17:15 ` [PATCH 1/4] kernel/kfifo.c: fix "interger " Stefani Seibold
3 siblings, 2 replies; 13+ messages in thread
From: Thiago Farina @ 2010-01-24 16:03 UTC (permalink / raw)
To: tfransosi
Cc: Steven Rostedt, Frederic Weisbecker, Ingo Molnar,
Arnaldo Carvalho de Melo, Li Zefan, linux-kernel
kernel/trace/trace_output.c:256:24: warning: Using plain integer as NULL pointer
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
---
kernel/trace/trace_output.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index 8e46b33..2404c12 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -253,7 +253,7 @@ void *trace_seq_reserve(struct trace_seq *s, size_t len)
void *ret;
if (s->full)
- return 0;
+ return NULL;
if (len > ((PAGE_SIZE - 1) - s->len)) {
s->full = 1;
--
1.6.6.1.383.g5a9f
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 3/4] trace/trace_output.c: fix "integer as NULL pointer" warning.
2010-01-24 16:03 ` [PATCH 3/4] trace/trace_output.c: " Thiago Farina
@ 2010-01-25 21:40 ` Steven Rostedt
2010-05-05 15:59 ` Steven Rostedt
2010-05-07 18:40 ` [tip:tracing/core] tracing: Fix " tip-bot for Thiago Farina
1 sibling, 1 reply; 13+ messages in thread
From: Steven Rostedt @ 2010-01-25 21:40 UTC (permalink / raw)
To: Thiago Farina
Cc: Frederic Weisbecker, Ingo Molnar, Arnaldo Carvalho de Melo,
Li Zefan, linux-kernel
On Sun, 2010-01-24 at 11:03 -0500, Thiago Farina wrote:
> kernel/trace/trace_output.c:256:24: warning: Using plain integer as NULL pointer
>
> Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Is this going through some other tree, or should I just pull it?
-- Steve
> ---
> kernel/trace/trace_output.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
> index 8e46b33..2404c12 100644
> --- a/kernel/trace/trace_output.c
> +++ b/kernel/trace/trace_output.c
> @@ -253,7 +253,7 @@ void *trace_seq_reserve(struct trace_seq *s, size_t len)
> void *ret;
>
> if (s->full)
> - return 0;
> + return NULL;
>
> if (len > ((PAGE_SIZE - 1) - s->len)) {
> s->full = 1;
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH 3/4] trace/trace_output.c: fix "integer as NULL pointer" warning.
2010-01-25 21:40 ` Steven Rostedt
@ 2010-05-05 15:59 ` Steven Rostedt
0 siblings, 0 replies; 13+ messages in thread
From: Steven Rostedt @ 2010-05-05 15:59 UTC (permalink / raw)
To: Thiago Farina
Cc: Frederic Weisbecker, Ingo Molnar, Arnaldo Carvalho de Melo,
Li Zefan, linux-kernel
On Mon, 2010-01-25 at 16:40 -0500, Steven Rostedt wrote:
> On Sun, 2010-01-24 at 11:03 -0500, Thiago Farina wrote:
> > kernel/trace/trace_output.c:256:24: warning: Using plain integer as NULL pointer
> >
> > Signed-off-by: Thiago Farina <tfransosi@gmail.com>
>
> Is this going through some other tree, or should I just pull it?
I guess this never went through any other tree (never got a response).
I'll pull it now.
-- Steve
> > ---
> > kernel/trace/trace_output.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
> > index 8e46b33..2404c12 100644
> > --- a/kernel/trace/trace_output.c
> > +++ b/kernel/trace/trace_output.c
> > @@ -253,7 +253,7 @@ void *trace_seq_reserve(struct trace_seq *s, size_t len)
> > void *ret;
> >
> > if (s->full)
> > - return 0;
> > + return NULL;
> >
> > if (len > ((PAGE_SIZE - 1) - s->len)) {
> > s->full = 1;
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [tip:tracing/core] tracing: Fix "integer as NULL pointer" warning.
2010-01-24 16:03 ` [PATCH 3/4] trace/trace_output.c: " Thiago Farina
2010-01-25 21:40 ` Steven Rostedt
@ 2010-05-07 18:40 ` tip-bot for Thiago Farina
1 sibling, 0 replies; 13+ messages in thread
From: tip-bot for Thiago Farina @ 2010-05-07 18:40 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, rostedt, tfransosi, tglx
Commit-ID: 668eb65f092902eb7dd526af73d4a7f025a94612
Gitweb: http://git.kernel.org/tip/668eb65f092902eb7dd526af73d4a7f025a94612
Author: Thiago Farina <tfransosi@gmail.com>
AuthorDate: Sun, 24 Jan 2010 11:03:50 -0500
Committer: Steven Rostedt <rostedt@goodmis.org>
CommitDate: Wed, 5 May 2010 12:01:26 -0400
tracing: Fix "integer as NULL pointer" warning.
kernel/trace/trace_output.c:256:24: warning: Using plain integer as NULL pointer
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
LKML-Reference: <1264349038-1766-3-git-send-email-tfransosi@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace_output.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index 8e46b33..2404c12 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -253,7 +253,7 @@ void *trace_seq_reserve(struct trace_seq *s, size_t len)
void *ret;
if (s->full)
- return 0;
+ return NULL;
if (len > ((PAGE_SIZE - 1) - s->len)) {
s->full = 1;
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/4] mm/memcontrol.c: fix "integer as NULL pointer" warning.
2010-01-24 16:03 [PATCH 1/4] kernel/kfifo.c: fix "interger as NULL pointer" warning Thiago Farina
2010-01-24 16:03 ` [PATCH 2/4] kernel/test_kprobes.c: fix "integer " Thiago Farina
2010-01-24 16:03 ` [PATCH 3/4] trace/trace_output.c: " Thiago Farina
@ 2010-01-24 16:03 ` Thiago Farina
2010-01-24 20:50 ` Balbir Singh
2010-01-24 17:15 ` [PATCH 1/4] kernel/kfifo.c: fix "interger " Stefani Seibold
3 siblings, 1 reply; 13+ messages in thread
From: Thiago Farina @ 2010-01-24 16:03 UTC (permalink / raw)
To: tfransosi
Cc: Balbir Singh, Pavel Emelyanov, KAMEZAWA Hiroyuki, Andrew Morton,
Daisuke Nishimura, Li Zefan, linux-mm, linux-kernel
mm/memcontrol.c:2548:32: warning: Using plain integer as NULL pointer
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
---
mm/memcontrol.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 954032b..d813823 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2545,7 +2545,7 @@ static int mem_cgroup_force_empty_list(struct mem_cgroup *mem,
pc = list_entry(list->prev, struct page_cgroup, lru);
if (busy == pc) {
list_move(&pc->lru, list);
- busy = 0;
+ busy = NULL;
spin_unlock_irqrestore(&zone->lru_lock, flags);
continue;
}
--
1.6.6.1.383.g5a9f
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 1/4] kernel/kfifo.c: fix "interger as NULL pointer" warning.
2010-01-24 16:03 [PATCH 1/4] kernel/kfifo.c: fix "interger as NULL pointer" warning Thiago Farina
` (2 preceding siblings ...)
2010-01-24 16:03 ` [PATCH 4/4] mm/memcontrol.c: fix " Thiago Farina
@ 2010-01-24 17:15 ` Stefani Seibold
2010-01-24 18:54 ` Thiago Farina
` (2 more replies)
3 siblings, 3 replies; 13+ messages in thread
From: Stefani Seibold @ 2010-01-24 17:15 UTC (permalink / raw)
To: Thiago Farina
Cc: Andrew Morton, Andi Kleen, Greg Kroah-Hartman,
Mauro Carvalho Chehab, linux-kernel
Am Sonntag, den 24.01.2010, 11:03 -0500 schrieb Thiago Farina:
> kernel/kfifo.c:83:35: warning: Using plain integer as NULL pointer
>
I don't know where you get this kind of warning. But passing 0 for a
NULL pointer is ANSI C standard.
> Signed-off-by: Thiago Farina <tfransosi@gmail.com>
> ---
> kernel/kfifo.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/kfifo.c b/kernel/kfifo.c
> index 32c5c15..6fe4a56 100644
> --- a/kernel/kfifo.c
> +++ b/kernel/kfifo.c
> @@ -80,7 +80,7 @@ int kfifo_alloc(struct kfifo *fifo, unsigned int size, gfp_t gfp_mask)
>
> buffer = kmalloc(size, gfp_mask);
> if (!buffer) {
> - _kfifo_init(fifo, 0, 0);
> + _kfifo_init(fifo, NULL, 0);
> return -ENOMEM;
> }
>
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH 1/4] kernel/kfifo.c: fix "interger as NULL pointer" warning.
2010-01-24 17:15 ` [PATCH 1/4] kernel/kfifo.c: fix "interger " Stefani Seibold
@ 2010-01-24 18:54 ` Thiago Farina
2010-01-25 10:11 ` Andi Kleen
2010-01-27 1:39 ` Thiago Farina
2 siblings, 0 replies; 13+ messages in thread
From: Thiago Farina @ 2010-01-24 18:54 UTC (permalink / raw)
To: Stefani Seibold
Cc: Andrew Morton, Andi Kleen, Greg Kroah-Hartman,
Mauro Carvalho Chehab, linux-kernel
On Sun, Jan 24, 2010 at 3:15 PM, Stefani Seibold <stefani@seibold.net> wrote:
> Am Sonntag, den 24.01.2010, 11:03 -0500 schrieb Thiago Farina:
>> kernel/kfifo.c:83:35: warning: Using plain integer as NULL pointer
>>
>
> I don't know where you get this kind of warning. But passing 0 for a
> NULL pointer is ANSI C standard.
This is a sparse warning. Got with: make C=1.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/4] kernel/kfifo.c: fix "interger as NULL pointer" warning.
2010-01-24 17:15 ` [PATCH 1/4] kernel/kfifo.c: fix "interger " Stefani Seibold
2010-01-24 18:54 ` Thiago Farina
@ 2010-01-25 10:11 ` Andi Kleen
2010-01-27 1:39 ` Thiago Farina
2 siblings, 0 replies; 13+ messages in thread
From: Andi Kleen @ 2010-01-25 10:11 UTC (permalink / raw)
To: Stefani Seibold
Cc: Thiago Farina, Andrew Morton, Greg Kroah-Hartman,
Mauro Carvalho Chehab, linux-kernel
Stefani Seibold wrote:
> Am Sonntag, den 24.01.2010, 11:03 -0500 schrieb Thiago Farina:
>> kernel/kfifo.c:83:35: warning: Using plain integer as NULL pointer
>>
>
> I don't know where you get this kind of warning. But passing 0 for a
> NULL pointer is ANSI C standard.
It's not "Linus C", as implemented in sparse unfortunately.
-Andi
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/4] kernel/kfifo.c: fix "interger as NULL pointer" warning.
2010-01-24 17:15 ` [PATCH 1/4] kernel/kfifo.c: fix "interger " Stefani Seibold
2010-01-24 18:54 ` Thiago Farina
2010-01-25 10:11 ` Andi Kleen
@ 2010-01-27 1:39 ` Thiago Farina
2010-01-27 6:44 ` Stefani Seibold
2 siblings, 1 reply; 13+ messages in thread
From: Thiago Farina @ 2010-01-27 1:39 UTC (permalink / raw)
To: Stefani Seibold
Cc: Andrew Morton, Andi Kleen, Greg Kroah-Hartman,
Mauro Carvalho Chehab, linux-kernel
Hi Stefani,
On Sun, Jan 24, 2010 at 3:15 PM, Stefani Seibold <stefani@seibold.net> wrote:
> Am Sonntag, den 24.01.2010, 11:03 -0500 schrieb Thiago Farina:
>> kernel/kfifo.c:83:35: warning: Using plain integer as NULL pointer
>>
>
> I don't know where you get this kind of warning. But passing 0 for a
> NULL pointer is ANSI C standard.
NACK?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/4] kernel/kfifo.c: fix "interger as NULL pointer" warning.
2010-01-27 1:39 ` Thiago Farina
@ 2010-01-27 6:44 ` Stefani Seibold
0 siblings, 0 replies; 13+ messages in thread
From: Stefani Seibold @ 2010-01-27 6:44 UTC (permalink / raw)
To: Thiago Farina
Cc: Andrew Morton, Andi Kleen, Greg Kroah-Hartman,
Mauro Carvalho Chehab, linux-kernel
Am Dienstag, den 26.01.2010, 23:39 -0200 schrieb Thiago Farina:
> Hi Stefani,
>
> On Sun, Jan 24, 2010 at 3:15 PM, Stefani Seibold <stefani@seibold.net> wrote:
> > Am Sonntag, den 24.01.2010, 11:03 -0500 schrieb Thiago Farina:
> >> kernel/kfifo.c:83:35: warning: Using plain integer as NULL pointer
> >>
> >
> > I don't know where you get this kind of warning. But passing 0 for a
> > NULL pointer is ANSI C standard.
>
> NACK?
Acked-by: Stefani Seibold <stefani@seibold.net>
^ permalink raw reply [flat|nested] 13+ messages in thread