linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Amitoj Kaur Chawla <amitoj1606@gmail.com>,
	rpurdie@rpsys.net, pavel@ucw.cz, linux-leds@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] leds: blinkm: constify attribute_group structure
Date: Mon, 14 Aug 2017 22:47:32 +0200	[thread overview]
Message-ID: <29cfc396-027f-9460-afea-a701ae76a78e@gmail.com> (raw)
In-Reply-To: <20170810162802.GA6881@amitoj-Inspiron-3542>

Hi Amitoj,

Similar patch is already queued in the for-next branch
of linux-leds.git.

Thanks,
Jacek Anaszewski

On 08/10/2017 06:28 PM, Amitoj Kaur Chawla wrote:
> Functions working with attribute_groups provided by <linux/sysfs.h>
> work with const attribute_group. These attribute_group structures do not
> change at runtime so mark them as const.
> 
> File size before:
>  text      data     bss     dec     hex filename
>  8657      3496      64   12217    2fb9 drivers/leds/leds-blinkm.o
> 
> File size after:
>  text      data     bss     dec     hex filename
>  8753      3400      64   12217    2fb9 drivers/leds/leds-blinkm.o
> 
> This change was made with the help of Coccinelle.
> 
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@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 struct attribute *blinkm_attrs[] = {
>  	NULL,
>  };
>  
> -static struct attribute_group blinkm_group = {
> +static const struct attribute_group blinkm_group = {
>  	.name = "blinkm",
>  	.attrs = blinkm_attrs,
>  };
> 

      reply	other threads:[~2017-08-14 20:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10 16:28 [PATCH 1/2] leds: blinkm: constify attribute_group structure Amitoj Kaur Chawla
2017-08-14 20:47 ` 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=29cfc396-027f-9460-afea-a701ae76a78e@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=amitoj1606@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).