Re: [PATCH v6 09/10] power: supply: Support ROHM bd99954 charger

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

 



On Tue, Mar 24, 2020 at 11:50:24AM +0200, Andy Shevchenko wrote:
> On Tue, Mar 24, 2020 at 10:32:19AM +0200, Matti Vaittinen wrote:

> > +static int bd9995x_get_prop_batt_present(struct bd9995x_device *bd)
> > +{
> > +	int ret, tmp;
> > +
> > +	ret = regmap_field_read(bd->rmap_fields[F_BATTEMP], &tmp);
> > +	if (ret)
> > +		return false;
> > +
> 
> > +	return (tmp != BATT_OPEN) ? true : false;
> 
> C 101 (I saw somewhere coccinelle script for this):
> 
> 	return tmp != BATT_OPEN;
> 
> > +}

Ah, and even more. Mistype of function and return value.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux