lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8d7be08f-fa20-d217-a606-738d79e36259@infradead.org>
Date:   Wed, 2 Sep 2020 08:34:47 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        Sebastian Reichel <sre@...nel.org>,
        Jonghwa Lee <jonghwa3.lee@...sung.com>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Jonathan Bakker <xc-racer2@...e.ca>
Cc:     linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] power: supply: charger-manager: Fix info message in
 check_charging_duration()

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@...nel.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ