Re: [PATCH] video/saa7164: Fix sparse warning: Using plain integer as NULL pointer

2011-01-26 Thread Mauro Carvalho Chehab
Em 25-01-2011 20:54, Peter Hüwe escreveu: > Am Dienstag 25 Januar 2011, 23:20:44 schrieb Julia Lawall: >> On Tue, 25 Jan 2011, Peter Huewe wrote: >>> This patch fixes the warning "Using plain integer as NULL pointer", >>> generated by sparse, by replacing the offending 0s with NULL. >> >> I recall

Re: [PATCH] video/saa7164: Fix sparse warning: Using plain integer as NULL pointer

2011-01-25 Thread Julia Lawall
On Tue, 25 Jan 2011, Peter Hüwe wrote: > Am Dienstag 25 Januar 2011, 23:20:44 schrieb Julia Lawall: > > On Tue, 25 Jan 2011, Peter Huewe wrote: > > > This patch fixes the warning "Using plain integer as NULL pointer", > > > generated by sparse, by replacing the offending 0s with NULL. > > > > I r

Re: [PATCH] video/saa7164: Fix sparse warning: Using plain integer as NULL pointer

2011-01-25 Thread Dan Carpenter
On Tue, Jan 25, 2011 at 11:20:44PM +0100, Julia Lawall wrote: > On Tue, 25 Jan 2011, Peter Huewe wrote: > > > This patch fixes the warning "Using plain integer as NULL pointer", > > generated by sparse, by replacing the offending 0s with NULL. > I recall (a number of years ago) being told that for

Re: [PATCH] video/saa7164: Fix sparse warning: Using plain integer as NULL pointer

2011-01-25 Thread Andy Walls
On Tue, 2011-01-25 at 18:05 -0500, Devin Heitmueller wrote: > On Tue, Jan 25, 2011 at 5:54 PM, Peter Hüwe wrote: > > Hi Julia, > > > > thanks for your input. > > So do I understand you correctly if I say > > if(!x) is better than if(x==NULL) in any case? The machine code should be equivalent in s

Re: [PATCH] video/saa7164: Fix sparse warning: Using plain integer as NULL pointer

2011-01-25 Thread Devin Heitmueller
On Tue, Jan 25, 2011 at 5:54 PM, Peter Hüwe wrote: > Hi Julia, > > thanks for your input. > So do I understand you correctly if I say > if(!x) is better than if(x==NULL) in any case? > > Or only for the kmalloc family? > > Do you remember the reason why !x should be preferred? > > In Documentation

Re: [PATCH] video/saa7164: Fix sparse warning: Using plain integer as NULL pointer

2011-01-25 Thread Peter Hüwe
Am Dienstag 25 Januar 2011, 23:20:44 schrieb Julia Lawall: > On Tue, 25 Jan 2011, Peter Huewe wrote: > > This patch fixes the warning "Using plain integer as NULL pointer", > > generated by sparse, by replacing the offending 0s with NULL. > > I recall (a number of years ago) being told that for th

Re: [PATCH] video/saa7164: Fix sparse warning: Using plain integer as NULL pointer

2011-01-25 Thread Julia Lawall
On Tue, 25 Jan 2011, Peter Huewe wrote: > This patch fixes the warning "Using plain integer as NULL pointer", > generated by sparse, by replacing the offending 0s with NULL. I recall (a number of years ago) being told that for things like kmalloc, the proper test was !x, not x == NULL. julia >

[PATCH] video/saa7164: Fix sparse warning: Using plain integer as NULL pointer

2011-01-25 Thread Peter Huewe
This patch fixes the warning "Using plain integer as NULL pointer", generated by sparse, by replacing the offending 0s with NULL. KernelVersion: linus' tree-c723fdab Signed-off-by: Peter Huewe --- drivers/media/video/saa7164/saa7164-api.c |8 drivers/media/video/saa7164/saa7164