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: <bih6lxs4u7q2kfe4kmid35cpmnqmvjltvzv4wrowah6x7v3tth@kptyk7bnmnhv>
Date: Mon, 19 Jan 2026 08:38:58 +0200
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Val Packett <val@...kett.cool>
Cc: Sebastian Reichel <sre@...nel.org>, Abel Vesa <abelvesa@...nel.org>,
        Sebastian Reichel <sebastian.reichel@...labora.com>,
        linux-arm-msm@...r.kernel.org, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] power: supply: qcom_battmgr: Recognize "LiP" as
 lithium-polymer

On Sat, Jan 17, 2026 at 06:09:24PM -0300, Val Packett wrote:
> On the Dell Latitude 7455, the firmware uses "LiP" with a lowercase 'i'
> for the battery chemistry type, but only all-uppercase "LIP" was being
> recognized. Add the CamelCase variant to the check to fix the "Unknown
> battery technology" warning.
> 
> Fixes: 202ac22b8e2e ("power: supply: qcom_battmgr: Add lithium-polymer entry")
> Signed-off-by: Val Packett <val@...kett.cool>
> ---
>  drivers/power/supply/qcom_battmgr.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/qcom_battmgr.c b/drivers/power/supply/qcom_battmgr.c
> index c8028606bba0..80e701c66434 100644
> --- a/drivers/power/supply/qcom_battmgr.c
> +++ b/drivers/power/supply/qcom_battmgr.c
> @@ -1240,7 +1240,8 @@ static unsigned int qcom_battmgr_sc8280xp_parse_technology(const char *chemistry
>  	if ((!strncmp(chemistry, "LIO", BATTMGR_CHEMISTRY_LEN)) ||
>  	    (!strncmp(chemistry, "OOI", BATTMGR_CHEMISTRY_LEN)))
>  		return POWER_SUPPLY_TECHNOLOGY_LION;
> -	if (!strncmp(chemistry, "LIP", BATTMGR_CHEMISTRY_LEN))
> +	if (!strncmp(chemistry, "LIP", BATTMGR_CHEMISTRY_LEN) ||
> +	    (!strncmp(chemistry, "LiP", BATTMGR_CHEMISTRY_LEN)))

Why do you have extra brackets around the second strncmp?

>  		return POWER_SUPPLY_TECHNOLOGY_LIPO;
>  
>  	pr_err("Unknown battery technology '%s'\n", chemistry);
> -- 
> 2.51.2
> 

-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ