Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754788AbbGXUxo (ORCPT ); Fri, 24 Jul 2015 16:53:44 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:35757 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754753AbbGXUxl (ORCPT ); Fri, 24 Jul 2015 16:53:41 -0400 From: Pali =?utf-8?q?Roh=C3=A1r?= To: "Andrew F. Davis" Subject: Re: [PATCH 8/8] power: bq27xxx_battery: Cleanup health checking Date: Fri, 24 Jul 2015 22:53:37 +0200 User-Agent: KMail/1.13.7 (Linux/3.13.0-58-generic; KDE/4.14.2; x86_64; ; ) Cc: Sebastian Reichel , "Dmitry Eremin-Solenikov" , David Woodhouse , Dan Murphy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <1437601920-13045-1-git-send-email-afd@ti.com> <20150723162212.GI29125@pali> <55B29FBB.8080500@ti.com> In-Reply-To: <55B29FBB.8080500@ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1490877.vom1oeGrgu"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201507242253.37997@pali> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1488 Lines: 46 --nextPart1490877.vom1oeGrgu Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Friday 24 July 2015 22:27:39 Andrew F. Davis wrote: > On 07/23/2015 11:22 AM, Pali Roh=C3=A1r 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; > >=20 > > Good candidates for "if (unlikely(...))" ? >=20 > I wasn't sure, but I don't see why not. Added. >=20 You wrote "Unlikely" in comment, so I thought that unlikely macro sounds=20 reasonable here... =2D-=20 Pali Roh=C3=A1r pali.rohar@gmail.com --nextPart1490877.vom1oeGrgu Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAlWypdEACgkQi/DJPQPkQ1LhdwCbBxfM9HbmGr5+YWQFjkhuJ9R9 Hl4An3YzXUxF6QNw0Al5HwARJ3uyXhC7 =TBaX -----END PGP SIGNATURE----- --nextPart1490877.vom1oeGrgu-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/