summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_transport_spi.c
diff options
context:
space:
mode:
authorColin Ian King2018-02-14 23:35:43 +0100
committerMartin K. Petersen2018-02-16 00:20:14 +0100
commitc62f40bfb26356bb289267f3b802ec0434fdc118 (patch)
tree6fc84d5f5972737f4eed464c43e330cb4ba40be2 /drivers/scsi/scsi_transport_spi.c
parentscsi: scsi_debug: reset injection flags for every_nth > 0 (diff)
downloadkernel-qcow2-linux-c62f40bfb26356bb289267f3b802ec0434fdc118.tar.gz
kernel-qcow2-linux-c62f40bfb26356bb289267f3b802ec0434fdc118.tar.xz
kernel-qcow2-linux-c62f40bfb26356bb289267f3b802ec0434fdc118.zip
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>
Diffstat (limited to 'drivers/scsi/scsi_transport_spi.c')
-rw-r--r--drivers/scsi/scsi_transport_spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c
index 871ea582029e..2ca150b16764 100644
--- a/drivers/scsi/scsi_transport_spi.c
+++ b/drivers/scsi/scsi_transport_spi.c
@@ -822,11 +822,11 @@ spi_dv_device_get_echo_buffer(struct scsi_device *sdev, u8 *buffer)
* fails, the device won't let us write to the echo buffer
* so just return failure */
- const char spi_test_unit_ready[] = {
+ static const char spi_test_unit_ready[] = {
TEST_UNIT_READY, 0, 0, 0, 0, 0
};
- const char spi_read_buffer_descriptor[] = {
+ static const char spi_read_buffer_descriptor[] = {
READ_BUFFER, 0x0b, 0, 0, 0, 0, 0, 0, 4, 0
};