[patch] drm/nouveau/disp: sizeof() wrong pointer

2013-01-23 Thread Bernd Petrovitsch
On Mit, 2013-01-23 at 11:38 +0300, Dan Carpenter wrote: > On Tue, Jan 22, 2013 at 10:42:25AM +0100, Paul Menzel wrote: > > > > Did you find this by manual inspection or did you use some tool? > > I found this because it caused a problem in a parser I was working > on but Sparse warns about "warni

[patch] drm/nouveau/disp: sizeof() wrong pointer

2013-01-23 Thread Dan Carpenter
On Tue, Jan 22, 2013 at 10:42:25AM +0100, Paul Menzel wrote: > > Did you find this by manual inspection or did you use some tool? > I found this because it caused a problem in a parser I was working on but Sparse warns about "warning: expression using sizeof(void)". It's sort of hard to run Spa

Re: [patch] drm/nouveau/disp: sizeof() wrong pointer

2013-01-23 Thread Bernd Petrovitsch
On Mit, 2013-01-23 at 11:38 +0300, Dan Carpenter wrote: > On Tue, Jan 22, 2013 at 10:42:25AM +0100, Paul Menzel wrote: > > > > Did you find this by manual inspection or did you use some tool? > > I found this because it caused a problem in a parser I was working > on but Sparse warns about "warni

Re: [patch] drm/nouveau/disp: sizeof() wrong pointer

2013-01-23 Thread Dan Carpenter
On Tue, Jan 22, 2013 at 10:42:25AM +0100, Paul Menzel wrote: > > Did you find this by manual inspection or did you use some tool? > I found this because it caused a problem in a parser I was working on but Sparse warns about "warning: expression using sizeof(void)". It's sort of hard to run Spa

[patch] drm/nouveau/disp: sizeof() wrong pointer

2013-01-22 Thread Paul Menzel
Dear Dan, Am Dienstag, den 22.01.2013, 10:20 +0300 schrieb Dan Carpenter: > "data" is a void pointer and "args" is "data" after we have casted it to > a struct. We care about the sizeof the struct here. Btw, sizeof(*data) s,sizeof the,size of the, > is 1. Did you find this by manual inspecti

[patch] drm/nouveau/disp: sizeof() wrong pointer

2013-01-22 Thread Dan Carpenter
"data" is a void pointer and "args" is "data" after we have casted it to a struct. We care about the sizeof the struct here. Btw, sizeof(*data) is 1. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c b/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c ind

Re: [patch] drm/nouveau/disp: sizeof() wrong pointer

2013-01-22 Thread Paul Menzel
Dear Dan, Am Dienstag, den 22.01.2013, 10:20 +0300 schrieb Dan Carpenter: > "data" is a void pointer and "args" is "data" after we have casted it to > a struct. We care about the sizeof the struct here. Btw, sizeof(*data) s,sizeof the,size of the, > is 1. Did you find this by manual inspecti

[patch] drm/nouveau/disp: sizeof() wrong pointer

2013-01-21 Thread Dan Carpenter
"data" is a void pointer and "args" is "data" after we have casted it to a struct. We care about the sizeof the struct here. Btw, sizeof(*data) is 1. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c b/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c ind