libata: make static arrays const, reduces object code size
authorColin Ian King <colin.king@canonical.com>
Tue, 19 Sep 2017 08:39:52 +0000 (09:39 +0100)
committerTejun Heo <tj@kernel.org>
Tue, 19 Sep 2017 18:53:11 +0000 (11:53 -0700)
commite94f7914fa8731cc64260c0a3a0b7b9957523730
treea0edf48c133f53895e1806e31840221132350ceb
parent01bb12e49b85ee99fa8445cbbc450092cd34afc9
libata: make static arrays const, reduces object code size

Don't populate const arrayis on the stack, instead make them static.
Makes the object code smaller by over 260 bytes:

Before:
   text    data     bss     dec     hex filename
  64864    5948    4128   74940   124bc drivers/ata/libata-scsi.o

After:
   text    data     bss     dec     hex filename
  64183    6364    4128   74675   123b3 drivers/ata/libata-scsi.o

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/libata-scsi.c