add consts where appropriate in fs/nls/*
Add const modifiers to a few struct nls_table's member pointers in include/linux/nls.h and adds a lot of const's in fs/nls/*.c files. Resulting changes as visible by size: text data bss dec hex filename 113612 481216 2368 597196 91ccc nls.org/built-in.o 593548 3296 288 597132 91c8c nls/built-in.o Apparently compiler managed to optimize code a bit better because of const-ness. No other changes are made. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
37c42524d6
commit
b9ec0339d8
@ -7,13 +7,13 @@
|
||||
typedef __u16 wchar_t;
|
||||
|
||||
struct nls_table {
|
||||
char *charset;
|
||||
char *alias;
|
||||
const char *charset;
|
||||
const char *alias;
|
||||
int (*uni2char) (wchar_t uni, unsigned char *out, int boundlen);
|
||||
int (*char2uni) (const unsigned char *rawstring, int boundlen,
|
||||
wchar_t *uni);
|
||||
unsigned char *charset2lower;
|
||||
unsigned char *charset2upper;
|
||||
const unsigned char *charset2lower;
|
||||
const unsigned char *charset2upper;
|
||||
struct module *owner;
|
||||
struct nls_table *next;
|
||||
};
|
||||
|
Reference in New Issue
Block a user