From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] usb: core: sysfs: constify attribute_group
Date: Fri, 23 Jun 2017 11:28:10 +0530 [thread overview]
Message-ID: <e5f70c22695d4fd9ef4ed9b4b164a9024b40eb59.1498197409.git.arvind.yadav.cs@gmail.com> (raw)
File size before:
text data bss dec hex filename
6798 2848 4 9650 25b2 drivers/usb/core/sysfs.o
File size After adding 'const':
text data bss dec hex filename
7230 2400 4 9634 25a2 drivers/usb/core/sysfs.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/usb/core/sysfs.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
index dfc68ed..2af3121 100644
--- a/drivers/usb/core/sysfs.c
+++ b/drivers/usb/core/sysfs.c
@@ -617,7 +617,7 @@ static ssize_t usb3_hardware_lpm_u2_show(struct device *dev,
&dev_attr_usb2_lpm_besl.attr,
NULL,
};
-static struct attribute_group usb2_hardware_lpm_attr_group = {
+static const struct attribute_group usb2_hardware_lpm_attr_group = {
.name = power_group_name,
.attrs = usb2_hardware_lpm_attr,
};
@@ -627,7 +627,7 @@ static ssize_t usb3_hardware_lpm_u2_show(struct device *dev,
&dev_attr_usb3_hardware_lpm_u2.attr,
NULL,
};
-static struct attribute_group usb3_hardware_lpm_attr_group = {
+static const struct attribute_group usb3_hardware_lpm_attr_group = {
.name = power_group_name,
.attrs = usb3_hardware_lpm_attr,
};
@@ -639,7 +639,7 @@ static ssize_t usb3_hardware_lpm_u2_show(struct device *dev,
&dev_attr_active_duration.attr,
NULL,
};
-static struct attribute_group power_attr_group = {
+static const struct attribute_group power_attr_group = {
.name = power_group_name,
.attrs = power_attrs,
};
@@ -805,7 +805,7 @@ static ssize_t remove_store(struct device *dev, struct device_attribute *attr,
#endif
NULL,
};
-static struct attribute_group dev_attr_grp = {
+static const struct attribute_group dev_attr_grp = {
.attrs = dev_attrs,
};
@@ -838,7 +838,7 @@ static umode_t dev_string_attrs_are_visible(struct kobject *kobj,
return a->mode;
}
-static struct attribute_group dev_string_attr_grp = {
+static const struct attribute_group dev_string_attr_grp = {
.attrs = dev_string_attrs,
.is_visible = dev_string_attrs_are_visible,
};
@@ -1070,7 +1070,7 @@ static ssize_t interface_authorized_store(struct device *dev,
&dev_attr_interface_authorized.attr,
NULL,
};
-static struct attribute_group intf_attr_grp = {
+static const struct attribute_group intf_attr_grp = {
.attrs = intf_attrs,
};
@@ -1094,7 +1094,7 @@ static umode_t intf_assoc_attrs_are_visible(struct kobject *kobj,
return a->mode;
}
-static struct attribute_group intf_assoc_attr_grp = {
+static const struct attribute_group intf_assoc_attr_grp = {
.attrs = intf_assoc_attrs,
.is_visible = intf_assoc_attrs_are_visible,
};
--
1.9.1
next reply other threads:[~2017-06-23 5:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-23 5:58 Arvind Yadav [this message]
2017-06-24 7:55 ` [PATCH] usb: core: sysfs: constify attribute_group Greg KH
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=e5f70c22695d4fd9ef4ed9b4b164a9024b40eb59.1498197409.git.arvind.yadav.cs@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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;
as well as URLs for NNTP newsgroup(s).