Re: Bug in twl4030backupbatt_voltage()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Original Message ----- 
From: "Tony Lindgren" <tony@xxxxxxxxxxx>
To: "Madhusudhan Chikkature" <madhu.cr@xxxxxx>
Cc: "Adrian Hunter" <ext-adrian.hunter@xxxxxxxxx>; <linux-omap@xxxxxxxxxxxxxxx>
Sent: Wednesday, September 10, 2008 9:09 PM
Subject: Re: Bug in twl4030backupbatt_voltage()


>* Madhusudhan Chikkature <madhu.cr@xxxxxx> [080910 06:12]:
>> 
>> ----- Original Message ----- 
>> From: "Adrian Hunter" <ext-adrian.hunter@xxxxxxxxx>
>> To: "Tony Lindgren" <tony@xxxxxxxxxxx>
>> Cc: <linux-omap@xxxxxxxxxxxxxxx>; <madhu.cr@xxxxxx>
>> Sent: Wednesday, September 10, 2008 12:58 PM
>> Subject: Re: Bug in twl4030backupbatt_voltage()
>> 
>> 
>> > Tony Lindgren wrote:
>> >> * Adrian Hunter <ext-adrian.hunter@xxxxxxxxx> [080903 08:08]:
>> >>> In the omap tree, commit f91fd98be045bec9c18e13110f22dafd44cb84b5
>> >>> fixed a bug with the use of function twl4030_madc_conversion()
>> >>> relating to the local variable 'struct twl4030_madc_request req'
>> >>> not being fully initialised.
>> >>>
>> >>> The same problem appears to be in the function
>> >>> twl4030backupbatt_voltage() which is in drivers/power/twl4030_bci_battery.c
>> >> 
>> >> Thanks, I'll initialize it to NULL. Wouldn't it have been easier just
>> >> to write a patch instead of the description above? :)
>> > 
>> > Apparently.
>> > 
>> > There is also req.do_avg which should be zero, if you assume the programmer's
>> > intent was to have uninitialised members set to zero.
>> I guess, I did not look at all the other members of the "twl4030_madc_request" structure. I might have missed it.
>> The do_avg and func_cb fields can both be set to NULL.
> 
> Can you please check the code and send a patch?
Yes. I will do that.

Regards,
Madhu
> 
> Thanks,
> 
> Tony
> 
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux