Re: bq2415x_charger: Use common error handling code in bq2415x_timer_work()

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

 



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@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux