]> Git Repo - linux.git/commitdiff
net: can: at91_can: constify attribute_group structures.
authorArvind Yadav <[email protected]>
Tue, 18 Jul 2017 09:44:18 +0000 (15:14 +0530)
committerDavid S. Miller <[email protected]>
Tue, 18 Jul 2017 19:04:56 +0000 (12:04 -0700)
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by <linux/netdevice.h> work
with const attribute_group. So mark the non-const structs as const.

File size before:
   text    data     bss     dec     hex filename
   6164     304       0    6468    1944 drivers/net/can/at91_can.o

File size After adding 'const':
   text    data     bss     dec     hex filename
   6228     240       0    6468    1944 drivers/net/can/at91_can.o

Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/can/at91_can.c

index 0e0df0ba288cadf9cd3cde474284f14ee791157c..f37ce0e1b60370f6f7831afe48071f94de55deb8 100644 (file)
@@ -1232,7 +1232,7 @@ static struct attribute *at91_sysfs_attrs[] = {
        NULL,
 };
 
-static struct attribute_group at91_sysfs_attr_group = {
+static const struct attribute_group at91_sysfs_attr_group = {
        .attrs = at91_sysfs_attrs,
 };
 
This page took 0.05493 seconds and 4 git commands to generate.