]> git.baikalelectronics.ru Git - kernel.git/commit
CIFS: make arrays static const, reduces object code size
authorColin Ian King <colin.king@canonical.com>
Tue, 19 Sep 2017 15:27:39 +0000 (16:27 +0100)
committerSteve French <smfrench@gmail.com>
Wed, 20 Sep 2017 23:46:10 +0000 (18:46 -0500)
commitbc5aa9b91dcef71752c1474688f746c5624b21b8
tree66588cfa91235c3d310652603874d34d28694a5e
parent3b0d19d119b3774baddbf37aa8bb1429d367455f
CIFS: make arrays static const, reduces object code size

Don't populate the read-only arrays types[] on the stack, instead make
them both static const.  Makes the object code smaller by over 200 bytes:

Before:
   text    data     bss     dec     hex filename
 111503   37696     448  149647   2488f fs/cifs/file.o

After:
   text    data     bss     dec     hex filename
 111140   37856     448  149444   247c4 fs/cifs/file.o

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
fs/cifs/file.c