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: <20191017134105.GA6766@roeck-us.net>
Date:   Thu, 17 Oct 2019 06:41:05 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Kyle Roeschley <kyle.roeschley@...com>
Cc:     Jean Delvare <jdelvare@...e.com>, linux-hwmon@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hwmon: (tmp421) Allow reading at 2Hz instead of 0.5Hz

On Mon, Oct 14, 2019 at 09:03:10AM -0500, Kyle Roeschley wrote:
> Our driver configures the device to read at 2Hz, but then only allows the
> user to read cached temp values at up to 0.5Hz. Let's allow users to read
> as quickly as we do.
> 
> Signed-off-by: Kyle Roeschley <kyle.roeschley@...com>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/tmp421.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/tmp421.c b/drivers/hwmon/tmp421.c
> index a94e35cff3e5..83a4fab151d2 100644
> --- a/drivers/hwmon/tmp421.c
> +++ b/drivers/hwmon/tmp421.c
> @@ -127,7 +127,8 @@ static struct tmp421_data *tmp421_update_device(struct device *dev)
>  
>  	mutex_lock(&data->update_lock);
>  
> -	if (time_after(jiffies, data->last_updated + 2 * HZ) || !data->valid) {
> +	if (time_after(jiffies, data->last_updated + (HZ / 2)) ||
> +	    !data->valid) {
>  		data->config = i2c_smbus_read_byte_data(client,
>  			TMP421_CONFIG_REG_1);
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ