mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: unisys: visorchipset: constify attribute_group structure
@ 2017-07-27  1:51 Amitoj Kaur Chawla
  2017-07-28  4:35 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Amitoj Kaur Chawla @ 2017-07-27  1:51 UTC (permalink / raw)
  To: david.kershner, gregkh, sparmaintainer, devel, linux-kernel

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
 24124     6216     448   30788    7844
drivers/staging/unisys/visorbus/visorchipset.o

File size after:
 text     data     bss     dec     hex filename
 24220    6120     448   30788    7844
drivers/staging/unisys/visorbus/visorchipset.o

This change was made with the help of Coccinelle.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 2215056..798a92e 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -1146,7 +1146,7 @@ static struct attribute *visorchipset_parahotplug_attrs[] = {
 	NULL
 };
 
-static struct attribute_group visorchipset_parahotplug_group = {
+static const struct attribute_group visorchipset_parahotplug_group = {
 	.name = "parahotplug",
 	.attrs = visorchipset_parahotplug_attrs
 };
-- 
2.7.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-28  4:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-27  1:51 [PATCH] staging: unisys: visorchipset: constify attribute_group structure Amitoj Kaur Chawla
2017-07-28  4:35 ` Greg KH

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®