Re: [patch] power: battery: pointer math issue in gab_probe()

2012-11-16 Thread Anton Vorontsov
On Sat, Sep 29, 2012 at 10:13:46AM +0300, Dan Carpenter wrote: > psy->properties is an enum (32 bit type) so adding sizeof() puts us > four times further along than we intended. It should be cast to a char > pointer before doing the math. > > Signed-off-by: Dan Carpenter > --- > Casting to void

Re: [patch] power: battery: pointer math issue in gab_probe()

2012-11-05 Thread Anton Vorontsov
On Mon, Nov 05, 2012 at 04:09:45PM +0300, Dan Carpenter wrote: > On Mon, Nov 05, 2012 at 09:34:21PM +0900, anish kumar wrote: > > Hello Dan, > > > > Is this patch of yours picked up by anyone? > > David this should go through you? I'll merge it soon. Sorry for the delay, quite busy lately. :-/

Re: [patch] power: battery: pointer math issue in gab_probe()

2012-11-05 Thread Dan Carpenter
On Mon, Nov 05, 2012 at 09:34:21PM +0900, anish kumar wrote: > Hello Dan, > > Is this patch of yours picked up by anyone? David this should go through you? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vge

Re: [patch] power: battery: pointer math issue in gab_probe()

2012-11-05 Thread anish kumar
Hello Dan, Is this patch of yours picked up by anyone? On Sun, 2012-09-30 at 09:38 +0530, anish kumar wrote: > On Sat, 2012-09-29 at 10:13 +0300, Dan Carpenter wrote: > > psy->properties is an enum (32 bit type) so adding sizeof() puts us > > four times further along than we intended. It should b

Re: [patch] power: battery: pointer math issue in gab_probe()

2012-09-30 Thread Dan Carpenter
On Sun, Sep 30, 2012 at 09:38:45AM +0530, anish kumar wrote: > On Sat, 2012-09-29 at 10:13 +0300, Dan Carpenter wrote: > > psy->properties is an enum (32 bit type) so adding sizeof() puts us > > four times further along than we intended. It should be cast to a char > > pointer before doing the mat

Re: [patch] power: battery: pointer math issue in gab_probe()

2012-09-29 Thread anish kumar
On Sat, 2012-09-29 at 10:13 +0300, Dan Carpenter wrote: > psy->properties is an enum (32 bit type) so adding sizeof() puts us > four times further along than we intended. It should be cast to a char > pointer before doing the math. You really read this driver to find out this one. Good one. > > S

[patch] power: battery: pointer math issue in gab_probe()

2012-09-29 Thread Dan Carpenter
psy->properties is an enum (32 bit type) so adding sizeof() puts us four times further along than we intended. It should be cast to a char pointer before doing the math. Signed-off-by: Dan Carpenter --- Casting to void * would also work on GCC, at least. diff --git a/drivers/power/generic-adc-b