lkml.org 
[lkml]   [2020]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH v2] power: supply: charger-manager: Fix info message in check_charging_duration()
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().

Also, while there, replace "exceed" with "exceeds", for both messages.

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>
---
Changes in v2:
- Replace "exceed" with "exceeds"

drivers/power/supply/charger-manager.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
index 07992821e252..a6d5dbd55e37 100644
--- a/drivers/power/supply/charger-manager.c
+++ b/drivers/power/supply/charger-manager.c
@@ -464,7 +464,7 @@ static int check_charging_duration(struct charger_manager *cm)
duration = curr - cm->charging_start_time;

if (duration > desc->charging_max_duration_ms) {
- dev_info(cm->dev, "Charging duration exceed %ums\n",
+ dev_info(cm->dev, "Charging duration exceeds %ums\n",
desc->charging_max_duration_ms);
ret = true;
}
@@ -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 exceeds %ums\n",
+ desc->charging_max_duration_ms);
ret = true;
}
}
--
2.27.0
\
 
 \ /
  Last update: 2020-09-02 18:17    [W:0.182 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site