From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Cc: andreas.noever@gmail.com, michael.jamet@intel.com,
yehezkel.bernat@intel.com, linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] thunderbolt: constify attribute_group structure
Date: Sat, 5 Aug 2017 11:35:20 +0300 [thread overview]
Message-ID: <20170805083520.GF2369@lahna.fi.intel.com> (raw)
In-Reply-To: <20170805014209.GA5095@amitoj-Inspiron-3542>
On Fri, Aug 04, 2017 at 09:42:09PM -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
> 28565 7300 0 35865 8c19 drivers/thunderbolt/switch.o
>
> File size after:
> text data bss dec hex filename
> 28661 7204 0 35865 8c19 drivers/thunderbolt/switch.o
>
> This change was made with the help of Coccinelle.
>
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Unfortunately you forgot to Cc Greg. He has been gathering Thunderbolt
related patches. I added him now but it may be that you need to resend
the patch to make it easier for him to apply.
> ---
> drivers/thunderbolt/switch.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
> index e9391bb..6cd4f14 100644
> --- a/drivers/thunderbolt/switch.c
> +++ b/drivers/thunderbolt/switch.c
> @@ -970,7 +970,7 @@ static umode_t switch_attr_is_visible(struct kobject *kobj,
> return sw->safe_mode ? 0 : attr->mode;
> }
>
> -static struct attribute_group switch_group = {
> +static const struct attribute_group switch_group = {
> .is_visible = switch_attr_is_visible,
> .attrs = switch_attrs,
> };
> --
> 2.7.4
prev parent reply other threads:[~2017-08-05 8:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-05 1:42 [PATCH] thunderbolt: constify attribute_group structure Amitoj Kaur Chawla
2017-08-05 8:35 ` Mika Westerberg [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=20170805083520.GF2369@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=amitoj1606@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.jamet@intel.com \
--cc=yehezkel.bernat@intel.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