lkml.org 
[lkml]   [2020]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v5 4/5] power: supply: Add support for mps mp2629 battery charger
On Sat, Mar 28, 2020 at 1:29 PM saravanan sekar <sravanhome@gmail.com> wrote:
> On 28/03/20 12:02 pm, Andy Shevchenko wrote:
> > On Sat, Mar 28, 2020 at 2:12 AM Saravanan Sekar <sravanhome@gmail.com> wrote:

...

> >> + val->intval = (rval * props[fld].step) + props[fld].min;
> > Too many parentheses.
> >
> > ...
> >
> >> + return ((psp == POWER_SUPPLY_PROP_PRECHARGE_CURRENT) ||
> >> + (psp == POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT) ||
> >> + (psp == POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT) ||
> >> + (psp == POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE));
> > Ditto.
> I think I misunderstood you previous review comment "Redundant
> parentheses", no sure what is the expectation

(At least) surrounding pair is not needed, return (a == b) || (c == d);

> > ...
> >
> >> + return ((psp == POWER_SUPPLY_PROP_INPUT_VOLTAGE_LIMIT) ||
> >> + (psp == POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT));
> > Ditto.

...

> >> + struct power_supply_config psy_cfg = {NULL};
> > { 0 }
> >
> NULL to make compiler happy.

Hmm... Can you share warning / error compiler issued in 0 case?

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2020-03-28 19:44    [W:0.069 / U:26.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site