[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201507242253.37997@pali>
Date: Fri, 24 Jul 2015 22:53:37 +0200
From: Pali Rohár <pali.rohar@...il.com>
To: "Andrew F. Davis" <afd@...com>
Cc: Sebastian Reichel <sre@...nel.org>,
"Dmitry Eremin-Solenikov" <dbaryshkov@...il.com>,
David Woodhouse <dwmw2@...radead.org>,
Dan Murphy <dmurphy@...com>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 8/8] power: bq27xxx_battery: Cleanup health checking
On Friday 24 July 2015 22:27:39 Andrew F. Davis wrote:
> On 07/23/2015 11:22 AM, Pali Rohár wrote:
> > On Wednesday 22 July 2015 16:52:00 Andrew F. Davis wrote:
> >> + /* Unlikely but important to return first */
> >> + if (bq27xxx_battery_overtemp(di, flags))
> >> + return POWER_SUPPLY_HEALTH_OVERHEAT;
> >> + if (bq27xxx_battery_undertemp(di, flags))
> >> + return POWER_SUPPLY_HEALTH_COLD;
> >> + if (bq27xxx_battery_dead(di, flags))
> >> + return POWER_SUPPLY_HEALTH_DEAD;
> >
> > Good candidates for "if (unlikely(...))" ?
>
> I wasn't sure, but I don't see why not. Added.
>
You wrote "Unlikely" in comment, so I thought that unlikely macro sounds
reasonable here...
--
Pali Rohár
pali.rohar@...il.com
Download attachment "signature.asc " of type "application/pgp-signature" (199 bytes)
Powered by blists - more mailing lists