From: Greg KH <gregkh@linuxfoundation.org>
To: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Cc: david.kershner@unisys.com, sparmaintainer@unisys.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: unisys: visorbus_main: constify attribute_group structures
Date: Thu, 27 Jul 2017 21:35:20 -0700 [thread overview]
Message-ID: <20170728043520.GA27597@kroah.com> (raw)
In-Reply-To: <20170725224552.GA3501@amitoj-Inspiron-3542>
On Tue, Jul 25, 2017 at 06:45:52PM -0400, 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
> 14216 7304 832 22352 5750
> drivers/staging/unisys/visorbus/visorbus_main.o
>
> File size after:
> text data bss dec hex filename
> 14408 7112 832 22352 5750
> drivers/staging/unisys/visorbus/visorbus_main.o
>
> This change was made with the help of Coccinelle.
>
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
> ---
> drivers/staging/unisys/visorbus/visorbus_main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
> index 1c785dd..bba10dc 100644
> --- a/drivers/staging/unisys/visorbus/visorbus_main.c
> +++ b/drivers/staging/unisys/visorbus/visorbus_main.c
> @@ -249,7 +249,7 @@ static struct attribute *channel_attrs[] = {
> NULL
> };
>
> -static struct attribute_group channel_attr_grp = {
> +static const struct attribute_group channel_attr_grp = {
> .name = "channel",
> .attrs = channel_attrs,
> };
> @@ -340,7 +340,7 @@ static struct attribute *dev_attrs[] = {
> NULL
> };
>
> -static struct attribute_group dev_attr_grp = {
> +static const struct attribute_group dev_attr_grp = {
> .attrs = dev_attrs,
> };
>
Does not apply to my tree :(
sorry,
greg k-h
prev parent reply other threads:[~2017-07-28 4:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-25 22:45 Amitoj Kaur Chawla
2017-07-28 4:35 ` Greg KH [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=20170728043520.GA27597@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=amitoj1606@gmail.com \
--cc=david.kershner@unisys.com \
--cc=devel@driverdev.osuosl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sparmaintainer@unisys.com \
/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®