* Re: [PATCH] power: supply: charger-manager: Fix info message in check_charging_duration()
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
0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2020-09-02 15:34 UTC (permalink / raw)
To: Gustavo A. R. Silva, Sebastian Reichel, Jonghwa Lee,
Krzysztof Kozlowski, Jonathan Bakker
Cc: linux-pm, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] power: supply: charger-manager: Fix info message in check_charging_duration()
@ 2020-09-02 15:38 Gustavo A. R. Silva
2020-09-02 15:34 ` Randy Dunlap
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2020-09-02 15:38 UTC (permalink / raw)
To: Sebastian Reichel, Jonghwa Lee, Krzysztof Kozlowski, Jonathan Bakker
Cc: linux-pm, linux-kernel, Gustavo A. R. Silva
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",
+ desc->charging_max_duration_ms);
ret = true;
}
}
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-02 15:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).