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]
Date:   Thu, 31 May 2018 07:28:34 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Bastian Germann <bastiangermann@...hpost.de>,
        Luca Tettamanti <kronos.it@...il.com>
Cc:     Jean Delvare <jdelvare@...e.com>, linux-hwmon@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] hwmon: (asus_atk0110) Remove unused manual sysfs file
 management

On 05/31/2018 07:01 AM, Bastian Germann wrote:
> Remove the manual sysfs file creation and deletion that are now taken care
> of by the (un)register calls via an attribute_group array.
> 
> Signed-off-by: Bastian Germann <bastiangermann@...hpost.de>

Ah, there is the removal. That needs to be part of patch #1.

Thanks,
Guenter

> ---
>   drivers/hwmon/asus_atk0110.c | 46 ------------------------------------
>   1 file changed, 46 deletions(-)
> 
> diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c
> index 8a35fb27ff50..2f4955ec8437 100644
> --- a/drivers/hwmon/asus_atk0110.c
> +++ b/drivers/hwmon/asus_atk0110.c
> @@ -263,14 +263,6 @@ static ssize_t atk_limit2_show(struct device *dev,
>   	return sprintf(buf, "%lld\n", value);
>   }
>   
> -static ssize_t atk_name_show(struct device *dev,
> -				struct device_attribute *attr, char *buf)
> -{
> -	return sprintf(buf, "atk0110\n");
> -}
> -static struct device_attribute atk_name_attr =
> -		__ATTR(name, 0444, atk_name_show, NULL);
> -
>   static void atk_init_attribute(struct device_attribute *attr, char *name,
>   		sysfs_show_func show)
>   {
> @@ -1194,44 +1186,6 @@ static int atk_enumerate_new_hwmon(struct atk_data *data)
>   	return err;
>   }
>   
> -static int atk_create_files(struct atk_data *data)
> -{
> -	struct atk_sensor_data *s;
> -	int err;
> -
> -	list_for_each_entry(s, &data->sensor_list, list) {
> -		err = device_create_file(data->hwmon_dev, &s->input_attr);
> -		if (err)
> -			return err;
> -		err = device_create_file(data->hwmon_dev, &s->label_attr);
> -		if (err)
> -			return err;
> -		err = device_create_file(data->hwmon_dev, &s->limit1_attr);
> -		if (err)
> -			return err;
> -		err = device_create_file(data->hwmon_dev, &s->limit2_attr);
> -		if (err)
> -			return err;
> -	}
> -
> -	err = device_create_file(data->hwmon_dev, &atk_name_attr);
> -
> -	return err;
> -}
> -
> -static void atk_remove_files(struct atk_data *data)
> -{
> -	struct atk_sensor_data *s;
> -
> -	list_for_each_entry(s, &data->sensor_list, list) {
> -		device_remove_file(data->hwmon_dev, &s->input_attr);
> -		device_remove_file(data->hwmon_dev, &s->label_attr);
> -		device_remove_file(data->hwmon_dev, &s->limit1_attr);
> -		device_remove_file(data->hwmon_dev, &s->limit2_attr);
> -	}
> -	device_remove_file(data->hwmon_dev, &atk_name_attr);
> -}
> -
>   static void atk_free_sensors(struct atk_data *data)
>   {
>   	struct list_head *head = &data->sensor_list;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ