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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 28 Aug 2017 22:56:08 +0200
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Bhumika Goyal <bhumirks@...il.com>
Cc:     julia.lawall@...6.fr, lenb@...nel.org, jbacik@...com,
        jikos@...nel.org, benjamin.tissoires@...hat.com,
        manish.chopra@...ium.com, rahul.verma@...ium.com,
        Dept-GELinuxNICDev@...ium.com, harish.patil@...ium.com,
        cascardo@...oscopio.com, don@...t.com.br, dvhart@...radead.org,
        andy@...radead.org, sre@...nel.org, linux-acpi@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
        nbd-general@...ts.sourceforge.net, linux-input@...r.kernel.org,
        netdev@...r.kernel.org, platform-driver-x86@...r.kernel.org,
        linux-pm@...r.kernel.org
Subject: Re: [PATCH 1/6] ACPI: make device_attribute const

On Monday, August 21, 2017 1:43:07 PM CEST Bhumika Goyal wrote:
> Make these const as they are only passed as an argument to the function
> device_create_file and device_remove_file and the corresponding
> arguments are of type const.
> Done using Coccinelle
> 
> Signed-off-by: Bhumika Goyal <bhumirks@...il.com>
> ---
>  drivers/acpi/battery.c | 2 +-
>  drivers/acpi/sbs.c     | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
> index 1cbb88d..13e7b56 100644
> --- a/drivers/acpi/battery.c
> +++ b/drivers/acpi/battery.c
> @@ -620,7 +620,7 @@ static ssize_t acpi_battery_alarm_store(struct device *dev,
>  	return count;
>  }
>  
> -static struct device_attribute alarm_attr = {
> +static const struct device_attribute alarm_attr = {
>  	.attr = {.name = "alarm", .mode = 0644},
>  	.show = acpi_battery_alarm_show,
>  	.store = acpi_battery_alarm_store,
> diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
> index a184637..a2428e9 100644
> --- a/drivers/acpi/sbs.c
> +++ b/drivers/acpi/sbs.c
> @@ -474,7 +474,7 @@ static ssize_t acpi_battery_alarm_store(struct device *dev,
>  	return count;
>  }
>  
> -static struct device_attribute alarm_attr = {
> +static const struct device_attribute alarm_attr = {
>  	.attr = {.name = "alarm", .mode = 0644},
>  	.show = acpi_battery_alarm_show,
>  	.store = acpi_battery_alarm_store,
> 

Applied, thanks!


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ