lkml.org 
[lkml]   [2017]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: bq2415x_charger: Use common error handling code in bq2415x_timer_work()
On Thursday 09 November 2017 14:04:19 SF Markus Elfring wrote:
> > Better fix would be to display separate messages; user is probably
> > interested in what failed...
>
> Which information (or wording) would you find more appropriate
> at these places?

Hi! Basically dropping your patch and instead of the "Unknown error"
return to user reason why BQ2415X_BOOST_MODE_STATUS or
BQ2415X_FAULT_STATUS commands failed. Or at least instead of the
"Unknown error" write "Unknown error during BQ2415X_FAULT_STATUS".

Basically I do not see any value in your patch. Current coding style
pattern in that function is:

do_something;
if failed:
print error;
return;

And your patch just changed some, but not *all* parts of code to:

do_something;
if failed:
goto end_of_function

If you are changing coding style, I would really suggest to change it on
all places to let it consistent. Because your change introduces just
inconsistency.

--
Pali Rohár
pali.rohar@gmail.com

\
 
 \ /
  Last update: 2017-11-09 14:15    [W:0.101 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site