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: <nycvar.YFH.7.76.1709061057200.4077@jbgna.fhfr.qr>
Date:   Wed, 6 Sep 2017 10:57:29 +0200 (CEST)
From:   Jiri Kosina <jikos@...nel.org>
To:     Bhumika Goyal <bhumirks@...il.com>
cc:     julia.lawall@...6.fr, rjw@...ysocki.net, lenb@...nel.org,
        jbacik@...com, 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 3/6] hid: make device_attribute const

On Mon, 21 Aug 2017, Bhumika Goyal wrote:

> Make this const as it is 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/hid/hid-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index 9bc9116..24e929c 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -1662,7 +1662,7 @@ static bool hid_hiddev(struct hid_device *hdev)
>  	.size = HID_MAX_DESCRIPTOR_SIZE,
>  };
>  
> -static struct device_attribute dev_attr_country = {
> +static const struct device_attribute dev_attr_country = {
>  	.attr = { .name = "country", .mode = 0444 },
>  	.show = show_country,

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ