* [Power-supply]: Error handling in max17042_battery.c
@ 2011-08-26 5:46 Pallala, Ramakrishna
2011-08-29 5:30 ` Pallala, Ramakrishna
0 siblings, 1 reply; 3+ messages in thread
From: Pallala, Ramakrishna @ 2011-08-26 5:46 UTC (permalink / raw)
To: linux-kernel; +Cc: myungjoo.ham, dwmw2, cbouatmailru, Pallala, Ramakrishna
Hi All,
I am working on the I2C based max17042 fuel gauge driver
Which is drivers/power/max17042_battery.c
In max17042_get_property(...), the values returned by
Max17042_read_reg are directly assigned to the variables,
even if the read results in an error. Shouldn't we check
for the 'correctness' of the returned values and then
assign them ? Can I submit a patch to change this ?
Or Is this done intentionally ?
Thanks,
Ram
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [Power-supply]: Error handling in max17042_battery.c
2011-08-26 5:46 [Power-supply]: Error handling in max17042_battery.c Pallala, Ramakrishna
@ 2011-08-29 5:30 ` Pallala, Ramakrishna
0 siblings, 0 replies; 3+ messages in thread
From: Pallala, Ramakrishna @ 2011-08-29 5:30 UTC (permalink / raw)
To: Pallala, Ramakrishna, linux-kernel; +Cc: myungjoo.ham, dwmw2, cbouatmailru
> Hi All,
>
> I am working on the I2C based max17042 fuel gauge driver
> Which is drivers/power/max17042_battery.c
>
> In max17042_get_property(...), the values returned by
> Max17042_read_reg are directly assigned to the variables,
> even if the read results in an error. Shouldn't we check
> for the 'correctness' of the returned values and then
> assign them ? Can I submit a patch to change this ?
>
> Or Is this done intentionally ?
Any inputs on this?
Thanks,
Ram
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Power-supply]: Error handling in max17042_battery.c
@ 2011-08-26 6:32 MyungJoo Ham
0 siblings, 0 replies; 3+ messages in thread
From: MyungJoo Ham @ 2011-08-26 6:32 UTC (permalink / raw)
To: Pallala, Ramakrishna, linux-kernel; +Cc: dwmw2, cbouatmailru
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 1071 bytes --]
Sender : Pallala, Ramakrishna<ramakrishna.pallala@intel.com> Date : 2011-08-26 14:46 (GMT+09:00)
> Hi All,
>
> I am working on the I2C based max17042 fuel gauge driver
> Which is drivers/power/max17042_battery.c
>
> In max17042_get_property(...), the values returned by
> Max17042_read_reg are directly assigned to the variables,
> even if the read results in an error. Shouldn't we check
> for the 'correctness' of the returned values and then
> assign them ? Can I submit a patch to change this ?
>
> Or Is this done intentionally ?
>
> Thanks,
> Ram
>
Hello,
I did not ignore and return the error values from max17042_read_reg() intentionally, I've just missed them somehow (maybe was too lazy that day?).
Handling errors from max17042_read_reg() at the side of max17042_get_property() is a feature missing. And, I'd be much appreciated if you'd send the patch you've mentioned.
Thank you,
MyungJooÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-29 5:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-26 5:46 [Power-supply]: Error handling in max17042_battery.c Pallala, Ramakrishna
2011-08-29 5:30 ` Pallala, Ramakrishna
2011-08-26 6:32 MyungJoo Ham
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.