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: <20180703195905.GA14558@roeck-us.net>
Date:   Tue, 3 Jul 2018 12:59:05 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Aleksei Mamlin <mamlinav@...il.com>
Cc:     Jean Delvare <jdelvare@...e.com>, linux-hwmon@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hwmon: w83795: Convert to
 hwmon_device_register_with_info()

On Tue, Jul 03, 2018 at 10:35:15PM +0300, Aleksei Mamlin wrote:
> This patch replaces deprecated call to hwmon_device_register() with the new
> hwmon_device_register_with_info().
> 
> Signed-off-by: Aleksei Mamlin <mamlinav@...il.com>

NACK. This doesn't really convert anything, it just exploits a loophole
that was necessary because some drivers can not be converted cleanly.

Guenter

> ---
>  drivers/hwmon/w83795.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c
> index 49276bbdac3d..25bcf988ef1c 100644
> --- a/drivers/hwmon/w83795.c
> +++ b/drivers/hwmon/w83795.c
> @@ -2234,7 +2234,8 @@ static int w83795_probe(struct i2c_client *client,
>  	if (data->chip_type == w83795g)
>  		w83795_check_dynamic_in_limits(client);
>  
> -	data->hwmon_dev = hwmon_device_register(dev);
> +	data->hwmon_dev = hwmon_device_register_with_info(dev, client->name,
> +							  data, NULL, NULL);
>  	if (IS_ERR(data->hwmon_dev)) {
>  		err = PTR_ERR(data->hwmon_dev);
>  		goto exit_remove;
> -- 
> 2.16.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ