scsi: scsi_transport_spi: make two const arrays static, shrinks object size
authorColin Ian King <colin.king@canonical.com>
Wed, 14 Feb 2018 22:35:43 +0000 (22:35 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 15 Feb 2018 23:20:14 +0000 (18:20 -0500)
commitc62f40bfb26356bb289267f3b802ec0434fdc118
tree6fc84d5f5972737f4eed464c43e330cb4ba40be2
parentf9ba7af8105f792d2204742810f9647aa32699cd
scsi: scsi_transport_spi: make two const arrays static, shrinks object size

Don't populate the const read-only arrays spi_test_unit_ready and
spi_test_unit_ready on the stack but instead make them static. Makes the
object code smaller by over 100 bytes:

Before:
   text    data     bss     dec     hex filename
  40171   12832     128   53131    cf8b drivers/scsi/scsi_transport_spi.o

After:
   text    data     bss     dec     hex filename
  39922   12976     128   53026    cf22 drivers/scsi/scsi_transport_spi.o

(gcc version 7.2.0 x86_64)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_transport_spi.c