From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>,
jansimon.moeller@gmx.de, rpurdie@rpsys.net, pavel@ucw.cz
Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] leds: blinkm: constify attribute_group structures.
Date: Fri, 4 Aug 2017 21:57:33 +0200 [thread overview]
Message-ID: <c8a12023-33fc-8dab-cf36-1457c20cb225@gmail.com> (raw)
In-Reply-To: <7f7a15506ee3ccb8d2d54e3f3209f5cd1105f031.1501827866.git.arvind.yadav.cs@gmail.com>
Hi Arvind,
Thanks for the patch.
On 08/04/2017 08:25 AM, Arvind Yadav wrote:
> attribute_group are not supposed to change at runtime. All functions
> working with attribute_group provided by <linux/sysfs.h> work with
> const attribute_group. So mark the non-const structs as const.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
> drivers/leds/leds-blinkm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/leds/leds-blinkm.c b/drivers/leds/leds-blinkm.c
> index 617fe97..d03ed6b 100644
> --- a/drivers/leds/leds-blinkm.c
> +++ b/drivers/leds/leds-blinkm.c
> @@ -298,7 +298,7 @@ static ssize_t store_test(struct device *dev, struct device_attribute *attr,
> NULL,
> };
>
> -static struct attribute_group blinkm_group = {
> +static const struct attribute_group blinkm_group = {
> .name = "blinkm",
> .attrs = blinkm_attrs,
> };
>
Applied to the for-next branch of linux-leds.git.
--
Best regards,
Jacek Anaszewski
prev parent reply other threads:[~2017-08-04 19:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-04 6:25 Arvind Yadav
2017-08-04 19:57 ` Jacek Anaszewski [this message]
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=c8a12023-33fc-8dab-cf36-1457c20cb225@gmail.com \
--to=jacek.anaszewski@gmail.com \
--cc=arvind.yadav.cs@gmail.com \
--cc=jansimon.moeller@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rpurdie@rpsys.net \
/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
all inboxes | Powered by JetHome®