Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp959947imc; Mon, 11 Mar 2019 03:25:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqwpLtVRZOZmoxSh+cSml+he3U7WjrFpNPFlbxI9KqgewDyuU/MWGUij0yWFsNBisHs2JTh+ X-Received: by 2002:aa7:930b:: with SMTP id 11mr32514175pfj.49.1552299905428; Mon, 11 Mar 2019 03:25:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552299905; cv=none; d=google.com; s=arc-20160816; b=BjZTAVnpJSgEjJzSWSBkhsNBmdqAHi5zgU/ghCF+70KSvrIHoOjJlepWpjY65EIsTn 5QWI0d9zB+hi1flfB4QNxamgWUD0KLkNeDK8ZkZqCe/MWb7hU1fPn9FHLbzylcS5Xue3 uIb+P2QjN98Wq4mEBxRPVdZREs3uqYFLlHY8Dk46C16kimT3TjXvoVoU7vSDa7g2HZbu LxL4jm1ltdhRDoHbE8+X+bCvhoFAeDMuRNbaVJrqfj0Dhiyx7z6yfJe+gOY6+K39dxG0 HlOzRSxbxR8E0+13++f6uJ8yHcU60capkyZWKHfqWTx3zQn5VBeg28l8bl+sLta8Wj+8 AjSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=zQ2yiJvlz5/DwR672Gq+2+aJwGIzpluhhSa8XmqQQik=; b=XbYQ8TId7KgeE8E5ShXoFXZb0F//45uQ+RJknIoxgFPCCYMnuHJoQK1PC7upNRmCkY ROMyQGvPTPCaOXhfjPjbDKx27HNZz3PJamxenel4XyOXc+qfCqNOcpqsY85rqUHrRcZV KpdmFzvjhZeMcBGUUuk33HSFNG+PkbC+wWxLTMQmfkJALGxXBMeAdmiYHzq8xQJQePlB rNeslR/p5wfYAW/yMQe+AS8qa3BaCezw1xXjUYqjk5jzlIU3ze83kJZQ4Rb0A1NvSTzl N/A+pQDwRw9nFA1PtKG7xCxiYrfCMoOEEwoHAjgvKxU4Gioeu+MS+lsg4KM61hDa9hav Rbrg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c13si4892849pgj.301.2019.03.11.03.24.49; Mon, 11 Mar 2019 03:25:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727017AbfCKKYa (ORCPT + 99 others); Mon, 11 Mar 2019 06:24:30 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:52807 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726567AbfCKKYa (ORCPT ); Mon, 11 Mar 2019 06:24:30 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 1B017806B8; Mon, 11 Mar 2019 11:23:19 +0100 (CET) Date: Mon, 11 Mar 2019 11:23:25 +0100 From: Pavel Machek To: kernel list , baolin.wang@linaro.org, linus.walleij@linaro.org, sebastian.reichel@collabora.com Cc: sre@kernel.org Subject: Re: 5.0-rc1 Open circuit voltage tables -- 3afb50d7125bc Message-ID: <20190311102325.GB14118@amd> References: <20190107190555.GA18865@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oLBj+sq0vYjzfsbl" Content-Disposition: inline In-Reply-To: <20190107190555.GA18865@amd> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --oLBj+sq0vYjzfsbl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon 2019-01-07 20:05:55, Pavel Machek wrote: > Hi! >=20 > Can we do something with that code? >=20 > First -- tables should not be necceessary. Formula for li-ion open > circuit voltage is well-known, and does not really depend on the > device -- only on the chemistry of battery. >=20 > state of charge =3D f( voltage, current, internal resistance ) >=20 > (And yes, internal resistance depends on temperature and health of the > battery). >=20 > Second, even if we need tables, why is it doing multiple allocations? >=20 > info->ocv_temp[index] =3D -EINVAL; >=20 > That's just wrong. Ocv_temp is temperature in celsius. Temperatures go > below zero. Ping? That code is just bad. Does someone care? Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --oLBj+sq0vYjzfsbl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlyGNx0ACgkQMOfwapXb+vKi3ACgnh+XSnldfD3xL/4BOi3FrAbw f2MAn227qHA1R8DedL1Annml947YNIl7 =abzA -----END PGP SIGNATURE----- --oLBj+sq0vYjzfsbl--