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: <20210602121032.GA2901466@roeck-us.net>
Date:   Wed, 2 Jun 2021 05:10:32 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Erik Rosen <erik.rosen@...ormote.com>
Cc:     Jean Delvare <jdelvare@...e.com>, Jonathan Corbet <corbet@....net>,
        Daniel Nilsson <daniel.nilsson@...x.com>,
        linux-hwmon@...r.kernel.org, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 3/5] hwmon: (pmbus/pim4328) Allow phase function even
 if it's not on page

On Tue, Jun 01, 2021 at 06:43:18PM +0200, Erik Rosen wrote:
> Allow the use of a phase function even if it does not exist not on
> the associated page.
> 
Nit: Too many "not"

Otherwise, for my reference:

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

Guenter

> Signed-off-by: Erik Rosen <erik.rosen@...ormote.com>
> ---
>  drivers/hwmon/pmbus/pmbus_core.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
> index cd80cb574267..7c4f7b6c846e 100644
> --- a/drivers/hwmon/pmbus/pmbus_core.c
> +++ b/drivers/hwmon/pmbus/pmbus_core.c
> @@ -1327,14 +1327,14 @@ static int pmbus_add_sensor_attrs(struct i2c_client *client,
>  
>  		pages = paged ? info->pages : 1;
>  		for (page = 0; page < pages; page++) {
> -			if (!(info->func[page] & attrs->func))
> -				continue;
> -			ret = pmbus_add_sensor_attrs_one(client, data, info,
> -							 name, index, page,
> -							 0xff, attrs, paged);
> -			if (ret)
> -				return ret;
> -			index++;
> +			if (info->func[page] & attrs->func) {
> +				ret = pmbus_add_sensor_attrs_one(client, data, info,
> +								 name, index, page,
> +								 0xff, attrs, paged);
> +				if (ret)
> +					return ret;
> +				index++;
> +			}
>  			if (info->phases[page]) {
>  				int phase;
>  
> -- 
> 2.20.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ