diff options
author | Joe Perches <joe@perches.com> | 2014-12-10 13:28:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-10 15:33:16 -0500 |
commit | 785c20a08bead1e58ad53f2dc324782da7a0c9ea (patch) | |
tree | 1fbf9ac09b89dea8754927e84a54c15ad3e47d0a /net/irda/parameters.c | |
parent | 22bbf5f3e4e4db4a94f18d7b1ba21b5bd5fd934b (diff) |
irda: Convert function pointer arrays and uses to const
Making things const is a good thing.
(x86-64 defconfig with all irda)
$ size net/irda/built-in.o*
text data bss dec hex filename
109276 1868 244 111388 1b31c net/irda/built-in.o.new
108828 2316 244 111388 1b31c net/irda/built-in.o.old
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda/parameters.c')
-rw-r--r-- | net/irda/parameters.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/irda/parameters.c b/net/irda/parameters.c index 006786bfdd65..16ce32ffe004 100644 --- a/net/irda/parameters.c +++ b/net/irda/parameters.c | |||
@@ -52,7 +52,7 @@ static int irda_insert_no_value(void *self, __u8 *buf, int len, __u8 pi, | |||
52 | static int irda_param_unpack(__u8 *buf, char *fmt, ...); | 52 | static int irda_param_unpack(__u8 *buf, char *fmt, ...); |
53 | 53 | ||
54 | /* Parameter value call table. Must match PV_TYPE */ | 54 | /* Parameter value call table. Must match PV_TYPE */ |
55 | static PV_HANDLER pv_extract_table[] = { | 55 | static const PV_HANDLER pv_extract_table[] = { |
56 | irda_extract_integer, /* Handler for any length integers */ | 56 | irda_extract_integer, /* Handler for any length integers */ |
57 | irda_extract_integer, /* Handler for 8 bits integers */ | 57 | irda_extract_integer, /* Handler for 8 bits integers */ |
58 | irda_extract_integer, /* Handler for 16 bits integers */ | 58 | irda_extract_integer, /* Handler for 16 bits integers */ |
@@ -62,7 +62,7 @@ static PV_HANDLER pv_extract_table[] = { | |||
62 | irda_extract_no_value /* Handler for no value parameters */ | 62 | irda_extract_no_value /* Handler for no value parameters */ |
63 | }; | 63 | }; |
64 | 64 | ||
65 | static PV_HANDLER pv_insert_table[] = { | 65 | static const PV_HANDLER pv_insert_table[] = { |
66 | irda_insert_integer, /* Handler for any length integers */ | 66 | irda_insert_integer, /* Handler for any length integers */ |
67 | irda_insert_integer, /* Handler for 8 bits integers */ | 67 | irda_insert_integer, /* Handler for 8 bits integers */ |
68 | irda_insert_integer, /* Handler for 16 bits integers */ | 68 | irda_insert_integer, /* Handler for 16 bits integers */ |
@@ -449,7 +449,7 @@ static int irda_param_unpack(__u8 *buf, char *fmt, ...) | |||
449 | int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len, | 449 | int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len, |
450 | pi_param_info_t *info) | 450 | pi_param_info_t *info) |
451 | { | 451 | { |
452 | pi_minor_info_t *pi_minor_info; | 452 | const pi_minor_info_t *pi_minor_info; |
453 | __u8 pi_minor; | 453 | __u8 pi_minor; |
454 | __u8 pi_major; | 454 | __u8 pi_major; |
455 | int type; | 455 | int type; |
@@ -504,7 +504,7 @@ EXPORT_SYMBOL(irda_param_insert); | |||
504 | static int irda_param_extract(void *self, __u8 *buf, int len, | 504 | static int irda_param_extract(void *self, __u8 *buf, int len, |
505 | pi_param_info_t *info) | 505 | pi_param_info_t *info) |
506 | { | 506 | { |
507 | pi_minor_info_t *pi_minor_info; | 507 | const pi_minor_info_t *pi_minor_info; |
508 | __u8 pi_minor; | 508 | __u8 pi_minor; |
509 | __u8 pi_major; | 509 | __u8 pi_major; |
510 | int type; | 510 | int type; |