From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Bhumika Goyal <bhumirks@gmail.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>, Josef Bacik <jbacik@fb.com>,
Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
manish.chopra@cavium.com, rahul.verma@cavium.com,
Dept-GELinuxNICDev@cavium.com, harish.patil@cavium.com,
cascardo@holoscopio.com, don@syst.com.br,
"dvhart@infradead.org" <dvhart@infradead.org>,
Andy Shevchenko <andy@infradead.org>,
Sebastian Reichel <sre@kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-block@vger.kernel.org, nbd-general@lists.sourceforge.net,
linux-input <linux-input@vger.kernel.org>,
netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH 5/6] platform/x86: make device_attribute const
Date: Wed, 30 Aug 2017 22:18:29 +0300 [thread overview]
Message-ID: <CAHp75VfohACiOR7XGd5o7LOMPQdDarfgN8HqvEqcg_oiCf-+VA@mail.gmail.com> (raw)
In-Reply-To: <1503315792-14837-6-git-send-email-bhumirks@gmail.com>
On Mon, Aug 21, 2017 at 2:43 PM, Bhumika Goyal <bhumirks@gmail.com> 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
>
Split on per driver basis.
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
> drivers/platform/x86/classmate-laptop.c | 6 +++---
> drivers/platform/x86/intel-rst.c | 4 ++--
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c
> index 55cf10b..d3715e2 100644
> --- a/drivers/platform/x86/classmate-laptop.c
> +++ b/drivers/platform/x86/classmate-laptop.c
> @@ -254,7 +254,7 @@ static ssize_t cmpc_accel_sensitivity_store_v4(struct device *dev,
> return strnlen(buf, count);
> }
>
> -static struct device_attribute cmpc_accel_sensitivity_attr_v4 = {
> +static const struct device_attribute cmpc_accel_sensitivity_attr_v4 = {
> .attr = { .name = "sensitivity", .mode = 0660 },
> .show = cmpc_accel_sensitivity_show_v4,
> .store = cmpc_accel_sensitivity_store_v4
> @@ -303,7 +303,7 @@ static ssize_t cmpc_accel_g_select_store_v4(struct device *dev,
> return strnlen(buf, count);
> }
>
> -static struct device_attribute cmpc_accel_g_select_attr_v4 = {
> +static const struct device_attribute cmpc_accel_g_select_attr_v4 = {
> .attr = { .name = "g_select", .mode = 0660 },
> .show = cmpc_accel_g_select_show_v4,
> .store = cmpc_accel_g_select_store_v4
> @@ -599,7 +599,7 @@ static ssize_t cmpc_accel_sensitivity_store(struct device *dev,
> return strnlen(buf, count);
> }
>
> -static struct device_attribute cmpc_accel_sensitivity_attr = {
> +static const struct device_attribute cmpc_accel_sensitivity_attr = {
> .attr = { .name = "sensitivity", .mode = 0660 },
> .show = cmpc_accel_sensitivity_show,
> .store = cmpc_accel_sensitivity_store
> diff --git a/drivers/platform/x86/intel-rst.c b/drivers/platform/x86/intel-rst.c
> index 7344d84..760a9bf 100644
> --- a/drivers/platform/x86/intel-rst.c
> +++ b/drivers/platform/x86/intel-rst.c
> @@ -65,7 +65,7 @@ static ssize_t irst_store_wakeup_events(struct device *dev,
> return count;
> }
>
> -static struct device_attribute irst_wakeup_attr = {
> +static const struct device_attribute irst_wakeup_attr = {
> .attr = { .name = "wakeup_events", .mode = 0600 },
> .show = irst_show_wakeup_events,
> .store = irst_store_wakeup_events
> @@ -111,7 +111,7 @@ static ssize_t irst_store_wakeup_time(struct device *dev,
> return count;
> }
>
> -static struct device_attribute irst_timeout_attr = {
> +static const struct device_attribute irst_timeout_attr = {
> .attr = { .name = "wakeup_time", .mode = 0600 },
> .show = irst_show_wakeup_time,
> .store = irst_store_wakeup_time
> --
> 1.9.1
>
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2017-08-30 19:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-21 11:43 [PATCH 0/6] drivers: make device_attribute const Bhumika Goyal
2017-08-21 11:43 ` [PATCH 1/6] ACPI: " Bhumika Goyal
2017-08-28 20:56 ` Rafael J. Wysocki
[not found] ` <1503315792-14837-1-git-send-email-bhumirks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-08-21 11:43 ` [PATCH 2/6] nbd: " Bhumika Goyal
2017-08-28 21:21 ` Jens Axboe
2017-08-21 11:43 ` [PATCH 3/6] hid: " Bhumika Goyal
2017-09-06 8:57 ` Jiri Kosina
2017-08-21 11:43 ` [PATCH 4/6] qlogic: " Bhumika Goyal
2017-08-21 17:25 ` David Miller
2017-08-21 17:26 ` Bhumika Goyal
2017-08-21 11:43 ` [PATCH 5/6] platform/x86: " Bhumika Goyal
2017-08-21 13:22 ` Thadeu Lima de Souza Cascardo
2017-08-30 19:18 ` Andy Shevchenko [this message]
2017-08-21 11:43 ` [PATCH 6/6] power: supply: " Bhumika Goyal
2017-08-29 8:44 ` Sebastian Reichel
2017-08-21 12:28 ` [PATCH 0/6] drivers: " Rafael J. Wysocki
2017-08-21 12:57 ` Bhumika Goyal
2017-08-21 12:55 ` Bhumika Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHp75VfohACiOR7XGd5o7LOMPQdDarfgN8HqvEqcg_oiCf-+VA@mail.gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=Dept-GELinuxNICDev@cavium.com \
--cc=andy@infradead.org \
--cc=benjamin.tissoires@redhat.com \
--cc=bhumirks@gmail.com \
--cc=cascardo@holoscopio.com \
--cc=don@syst.com.br \
--cc=dvhart@infradead.org \
--cc=harish.patil@cavium.com \
--cc=jbacik@fb.com \
--cc=jikos@kernel.org \
--cc=julia.lawall@lip6.fr \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manish.chopra@cavium.com \
--cc=nbd-general@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
--cc=rahul.verma@cavium.com \
--cc=rjw@rjwysocki.net \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).