All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Cc: rpurdie@rpsys.net, jacek.anaszewski@gmail.com,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] leds: lm3533: constify attribute_group structure
Date: Fri, 11 Aug 2017 14:34:38 +0200	[thread overview]
Message-ID: <20170811123437.GB16126@amd> (raw)
In-Reply-To: <20170810162809.GA6903@amitoj-Inspiron-3542>

[-- Attachment #1: Type: text/plain, Size: 1105 bytes --]

On Thu 2017-08-10 12:28:09, Amitoj Kaur Chawla wrote:
> Functions working with attribute_groups provided by <linux/device.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
>  8272      4608      64   12944    3290 drivers/leds/leds-lm3533.o
> 
> File size after:
>  text      data     bss     dec     hex filename
>  8368      4512      64   12944    3290 drivers/leds/leds-lm3533.o
> 
> This change was made with the help of Coccinelle.
> 
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>

patches 1,2:

Acked-by: Pavel Machek <pavel@ucw.cz>

								Pavel

> -static struct attribute_group lm3533_led_attribute_group = {
> +static const struct attribute_group lm3533_led_attribute_group = {
>  	.is_visible	= lm3533_led_attr_is_visible,
>  	.attrs		= lm3533_led_attributes
>  };

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2017-08-11 12:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10 16:28 [PATCH 2/2] leds: lm3533: constify attribute_group structure Amitoj Kaur Chawla
2017-08-11 12:34 ` Pavel Machek [this message]
2017-08-14 20:46 ` Jacek Anaszewski

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=20170811123437.GB16126@amd \
    --to=pavel@ucw.cz \
    --cc=amitoj1606@gmail.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.