* [PATCH][next] charger-manager: fix incorrect check on charging_duration_ms
@ 2020-09-02 13:31 ` Colin King
0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2020-09-02 13:31 UTC (permalink / raw)
To: Sebastian Reichel, Chanwoo Choi, Kyungmin Park, Myungjoo Ham,
Anton Vorontsov, linux-pm
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Currently the duration check on the discharging duration setting is
checking the charging duration rather than the discharging duration
due to a cut-n-paste coding error. Fix this by checking the value
desc->charging_max_duration_ms.
Addresses-Coverity: ("Copy-paste-error")
Fixes: 8fcfe088e21a ("charger-manager: Support limit of maximum possible")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/power/supply/charger-manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
index 07992821e252..44d919954e9e 100644
--- a/drivers/power/supply/charger-manager.c
+++ b/drivers/power/supply/charger-manager.c
@@ -471,7 +471,7 @@ static int check_charging_duration(struct charger_manager *cm)
} else if (cm->battery_status == POWER_SUPPLY_STATUS_NOT_CHARGING) {
duration = curr - cm->charging_end_time;
- if (duration > desc->charging_max_duration_ms) {
+ if (duration > desc->discharging_max_duration_ms) {
dev_info(cm->dev, "Discharging duration exceed %ums\n",
desc->discharging_max_duration_ms);
ret = true;
--
2.27.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH][next] charger-manager: fix incorrect check on charging_duration_ms
@ 2020-09-02 13:31 ` Colin King
0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2020-09-02 13:31 UTC (permalink / raw)
To: Sebastian Reichel, Chanwoo Choi, Kyungmin Park, Myungjoo Ham,
Anton Vorontsov, linux-pm
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Currently the duration check on the discharging duration setting is
checking the charging duration rather than the discharging duration
due to a cut-n-paste coding error. Fix this by checking the value
desc->charging_max_duration_ms.
Addresses-Coverity: ("Copy-paste-error")
Fixes: 8fcfe088e21a ("charger-manager: Support limit of maximum possible")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/power/supply/charger-manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
index 07992821e252..44d919954e9e 100644
--- a/drivers/power/supply/charger-manager.c
+++ b/drivers/power/supply/charger-manager.c
@@ -471,7 +471,7 @@ static int check_charging_duration(struct charger_manager *cm)
} else if (cm->battery_status = POWER_SUPPLY_STATUS_NOT_CHARGING) {
duration = curr - cm->charging_end_time;
- if (duration > desc->charging_max_duration_ms) {
+ if (duration > desc->discharging_max_duration_ms) {
dev_info(cm->dev, "Discharging duration exceed %ums\n",
desc->discharging_max_duration_ms);
ret = true;
--
2.27.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH][next] charger-manager: fix incorrect check on charging_duration_ms
2020-09-02 13:31 ` Colin King
@ 2020-09-02 15:50 ` Randy Dunlap
-1 siblings, 0 replies; 6+ messages in thread
From: Randy Dunlap @ 2020-09-02 15:50 UTC (permalink / raw)
To: Colin King, Sebastian Reichel, Chanwoo Choi, Kyungmin Park,
Myungjoo Ham, Anton Vorontsov, linux-pm
Cc: kernel-janitors, linux-kernel, Gustavo A. R. Silva
On 9/2/20 6:31 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently the duration check on the discharging duration setting is
> checking the charging duration rather than the discharging duration
> due to a cut-n-paste coding error. Fix this by checking the value
> desc->charging_max_duration_ms.
>
> Addresses-Coverity: ("Copy-paste-error")
> Fixes: 8fcfe088e21a ("charger-manager: Support limit of maximum possible")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Gustavo has a different patch:
https://lore.kernel.org/lkml/20200902153846.GA10327@embeddedor/
> ---
> drivers/power/supply/charger-manager.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
> index 07992821e252..44d919954e9e 100644
> --- a/drivers/power/supply/charger-manager.c
> +++ b/drivers/power/supply/charger-manager.c
> @@ -471,7 +471,7 @@ static int check_charging_duration(struct charger_manager *cm)
> } else if (cm->battery_status == POWER_SUPPLY_STATUS_NOT_CHARGING) {
> duration = curr - cm->charging_end_time;
>
> - if (duration > desc->charging_max_duration_ms) {
> + if (duration > desc->discharging_max_duration_ms) {
> dev_info(cm->dev, "Discharging duration exceed %ums\n",
preferably change: exceeds
> desc->discharging_max_duration_ms);
> ret = true;
>
--
~Randy
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][next] charger-manager: fix incorrect check on charging_duration_ms
@ 2020-09-02 15:50 ` Randy Dunlap
0 siblings, 0 replies; 6+ messages in thread
From: Randy Dunlap @ 2020-09-02 15:50 UTC (permalink / raw)
To: Colin King, Sebastian Reichel, Chanwoo Choi, Kyungmin Park,
Myungjoo Ham, Anton Vorontsov, linux-pm
Cc: kernel-janitors, linux-kernel, Gustavo A. R. Silva
On 9/2/20 6:31 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently the duration check on the discharging duration setting is
> checking the charging duration rather than the discharging duration
> due to a cut-n-paste coding error. Fix this by checking the value
> desc->charging_max_duration_ms.
>
> Addresses-Coverity: ("Copy-paste-error")
> Fixes: 8fcfe088e21a ("charger-manager: Support limit of maximum possible")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Gustavo has a different patch:
https://lore.kernel.org/lkml/20200902153846.GA10327@embeddedor/
> ---
> drivers/power/supply/charger-manager.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
> index 07992821e252..44d919954e9e 100644
> --- a/drivers/power/supply/charger-manager.c
> +++ b/drivers/power/supply/charger-manager.c
> @@ -471,7 +471,7 @@ static int check_charging_duration(struct charger_manager *cm)
> } else if (cm->battery_status = POWER_SUPPLY_STATUS_NOT_CHARGING) {
> duration = curr - cm->charging_end_time;
>
> - if (duration > desc->charging_max_duration_ms) {
> + if (duration > desc->discharging_max_duration_ms) {
> dev_info(cm->dev, "Discharging duration exceed %ums\n",
preferably change: exceeds
> desc->discharging_max_duration_ms);
> ret = true;
>
--
~Randy
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][next] charger-manager: fix incorrect check on charging_duration_ms
2020-09-02 13:31 ` Colin King
@ 2020-10-08 22:37 ` Sebastian Reichel
-1 siblings, 0 replies; 6+ messages in thread
From: Sebastian Reichel @ 2020-10-08 22:37 UTC (permalink / raw)
To: Colin King
Cc: Chanwoo Choi, Kyungmin Park, Myungjoo Ham, linux-pm,
kernel-janitors, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1417 bytes --]
Hi Colin,
On Wed, Sep 02, 2020 at 02:31:17PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently the duration check on the discharging duration setting is
> checking the charging duration rather than the discharging duration
> due to a cut-n-paste coding error. Fix this by checking the value
> desc->charging_max_duration_ms.
>
> Addresses-Coverity: ("Copy-paste-error")
> Fixes: 8fcfe088e21a ("charger-manager: Support limit of maximum possible")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
Thanks, queued.
-- Sebastian
> drivers/power/supply/charger-manager.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
> index 07992821e252..44d919954e9e 100644
> --- a/drivers/power/supply/charger-manager.c
> +++ b/drivers/power/supply/charger-manager.c
> @@ -471,7 +471,7 @@ static int check_charging_duration(struct charger_manager *cm)
> } else if (cm->battery_status == POWER_SUPPLY_STATUS_NOT_CHARGING) {
> duration = curr - cm->charging_end_time;
>
> - if (duration > desc->charging_max_duration_ms) {
> + if (duration > desc->discharging_max_duration_ms) {
> dev_info(cm->dev, "Discharging duration exceed %ums\n",
> desc->discharging_max_duration_ms);
> ret = true;
> --
> 2.27.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][next] charger-manager: fix incorrect check on charging_duration_ms
@ 2020-10-08 22:37 ` Sebastian Reichel
0 siblings, 0 replies; 6+ messages in thread
From: Sebastian Reichel @ 2020-10-08 22:37 UTC (permalink / raw)
To: Colin King
Cc: Chanwoo Choi, Kyungmin Park, Myungjoo Ham, linux-pm,
kernel-janitors, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1417 bytes --]
Hi Colin,
On Wed, Sep 02, 2020 at 02:31:17PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently the duration check on the discharging duration setting is
> checking the charging duration rather than the discharging duration
> due to a cut-n-paste coding error. Fix this by checking the value
> desc->charging_max_duration_ms.
>
> Addresses-Coverity: ("Copy-paste-error")
> Fixes: 8fcfe088e21a ("charger-manager: Support limit of maximum possible")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
Thanks, queued.
-- Sebastian
> drivers/power/supply/charger-manager.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
> index 07992821e252..44d919954e9e 100644
> --- a/drivers/power/supply/charger-manager.c
> +++ b/drivers/power/supply/charger-manager.c
> @@ -471,7 +471,7 @@ static int check_charging_duration(struct charger_manager *cm)
> } else if (cm->battery_status == POWER_SUPPLY_STATUS_NOT_CHARGING) {
> duration = curr - cm->charging_end_time;
>
> - if (duration > desc->charging_max_duration_ms) {
> + if (duration > desc->discharging_max_duration_ms) {
> dev_info(cm->dev, "Discharging duration exceed %ums\n",
> desc->discharging_max_duration_ms);
> ret = true;
> --
> 2.27.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-08 22:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-02 13:31 [PATCH][next] charger-manager: fix incorrect check on charging_duration_ms Colin King
2020-09-02 13:31 ` Colin King
2020-09-02 15:50 ` Randy Dunlap
2020-09-02 15:50 ` Randy Dunlap
2020-10-08 22:37 ` Sebastian Reichel
2020-10-08 22:37 ` Sebastian Reichel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.