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] [thread-next>] [day] [month] [year] [list]
Message-ID: <v5cblrwp3ubum3cciiwqazeivkwws2phkocxsdwa7v3hpwxuf4@bea76hsomovd>
Date: Wed, 6 Mar 2024 01:39:34 +0100
From: Sebastian Reichel <sebastian.reichel@...labora.com>
To: Thomas Weißschuh <linux@...ssschuh.net>
Cc: Hans de Goede <hdegoede@...hat.com>, 
	Konrad Dybcio <konradybcio@...nel.org>, linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 4/4] power: supply: test-power: implement
 charge_behaviour property

Hi,

On Sun, Mar 03, 2024 at 04:31:16PM +0100, Thomas Weißschuh wrote:
> To validate the special formatting of the "charge_behaviour" sysfs
> property add it to the example driver.
> 
> Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
> ---

Thanks for your patch.

>  drivers/power/supply/test_power.c | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
> 

[...]

> +static int test_power_set_battery_property(struct power_supply *psy,
> +					   enum power_supply_property psp,
> +					   const union power_supply_propval *val)
> +{
> +	switch (psp) {
> +	case POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR:
> +		battery_charge_behaviour = val->intval;
> +		break;

This should check if user supplied val->intval is valid, otherwise
LGTM.

-- Sebastian

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ