Re: [Nbd] [PATCH 3/6] hid: make device_attribute const
- To: Bhumika Goyal <bhumirks@gmail.com>
- Cc: cascardo@holoscopio.com, platform-driver-x86@vger.kernel.org, benjamin.tissoires@redhat.com, Dept-GELinuxNICDev@cavium.com, linux-acpi@vger.kernel.org, linux-input@vger.kernel.org, harish.patil@cavium.com, dvhart@infradead.org, lenb@kernel.org, linux-pm@vger.kernel.org, linux-block@vger.kernel.org, julia.lawall@lip6.fr, don@syst.com.br, nbd-general@lists.sourceforge.net, rahul.verma@cavium.com, jbacik@fb.com, netdev@vger.kernel.org, rjw@rjwysocki.net, sre@kernel.org, linux-kernel@vger.kernel.org, manish.chopra@cavium.com, andy@infradead.org
- Subject: Re: [Nbd] [PATCH 3/6] hid: make device_attribute const
- From: Jiri Kosina <jikos@kernel.org>
- Date: Wed, 6 Sep 2017 10:57:29 +0200 (CEST)
- Message-id: <[🔎] nycvar.YFH.7.76.1709061057200.4077@jbgna.fhfr.qr>
- In-reply-to: <1503315792-14837-4-git-send-email-bhumirks@gmail.com>
- References: <1503315792-14837-1-git-send-email-bhumirks@gmail.com> <1503315792-14837-4-git-send-email-bhumirks@gmail.com>
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@gmail.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
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nbd-general mailing list
Nbd-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nbd-general
Reply to: