From: Randy Dunlap <rdunlap@infradead.org>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>,
Sebastian Reichel <sre@kernel.org>,
Jonghwa Lee <jonghwa3.lee@samsung.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Jonathan Bakker <xc-racer2@live.ca>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] power: supply: charger-manager: Fix info message in check_charging_duration()
Date: Wed, 2 Sep 2020 08:34:47 -0700 [thread overview]
Message-ID: <8d7be08f-fa20-d217-a606-738d79e36259@infradead.org> (raw)
In-Reply-To: <20200902153846.GA10327@embeddedor>
On 9/2/20 8:38 AM, Gustavo A. R. Silva wrote:
> A few months ago, commit e132fc6bb89b ("power: supply: charger-manager: Make decisions focussed on battery status")
> changed the expression in the if statement from "duration > desc->discharging_max_duration_ms"
> to "duration > desc->charging_max_duration_ms", but the arguments for dev_info() were left unchanged.
> Apparently, due to a copy-paste error.
>
> Fix this by using the proper arguments for dev_info().
>
> Addresses-Coverity-ID: 1496803 ("Copy-paste error")
> Fixes: e132fc6bb89b ("power: supply: charger-manager: Make decisions focussed on battery status")
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
> drivers/power/supply/charger-manager.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
> index 07992821e252..6117018e89df 100644
> --- a/drivers/power/supply/charger-manager.c
> +++ b/drivers/power/supply/charger-manager.c
> @@ -472,8 +472,8 @@ static int check_charging_duration(struct charger_manager *cm)
> duration = curr - cm->charging_end_time;
>
> if (duration > desc->charging_max_duration_ms) {
> - dev_info(cm->dev, "Discharging duration exceed %ums\n",
> - desc->discharging_max_duration_ms);
> + dev_info(cm->dev, "Charging duration exceed %ums\n",
preferably exceeds
> + desc->charging_max_duration_ms);
> ret = true;
> }
> }
>
thanks.
--
~Randy
prev parent reply other threads:[~2020-09-02 15:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 15:38 [PATCH] power: supply: charger-manager: Fix info message in check_charging_duration() Gustavo A. R. Silva
2020-09-02 15:34 ` Randy Dunlap [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8d7be08f-fa20-d217-a606-738d79e36259@infradead.org \
--to=rdunlap@infradead.org \
--cc=gustavoars@kernel.org \
--cc=jonghwa3.lee@samsung.com \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=sre@kernel.org \
--cc=xc-racer2@live.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).