mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI / dock: constify attribute_group structure
Date: Thu, 10 Aug 2017 00:44:43 +0200	[thread overview]
Message-ID: <751192022.91ZtdmPBFf@aspire.rjw.lan> (raw)
In-Reply-To: <20170802002846.GA14666@amitoj-Inspiron-3542>

On Wednesday, August 2, 2017 2:28:46 AM CEST 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
>  7902      3528      64   11494    2ce6 drivers/acpi/dock.o
> 
> File size after:
>  text      data     bss     dec     hex filename
>  7998      3432      64   11494    2ce6 drivers/acpi/dock.o
> 
> This change was made with the help of Coccinelle.
> 
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
> ---
>  drivers/acpi/dock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
> index 0c00208..2305e1a 100644
> --- a/drivers/acpi/dock.c
> +++ b/drivers/acpi/dock.c
> @@ -585,7 +585,7 @@ static struct attribute *dock_attributes[] = {
>  	NULL
>  };
>  
> -static struct attribute_group dock_attribute_group = {
> +static const struct attribute_group dock_attribute_group = {
>  	.attrs = dock_attributes
>  };
>  
> 

Applied, thanks!

      reply	other threads:[~2017-08-09 22:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-02  0:28 Amitoj Kaur Chawla
2017-08-09 22:44 ` Rafael J. Wysocki [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=751192022.91ZtdmPBFf@aspire.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=amitoj1606@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®