Commit 5ece56a2 authored by Colin Ian King's avatar Colin Ian King Committed by Martin K. Petersen

scsi: ips: make array 'options' static const, makes object smaller

Don't populate the array 'options' on the stack but instead make it static
const. Makes the object code smaller by 143 bytes.

Before:
   text	   data	    bss	    dec	    hex	filename
  94483	  11272	   1184	 106939	  1a1bb	drivers/scsi/ips.o

After:
   text	   data	    bss	    dec	    hex	filename
  94244	  11368	   1184	 106796	  1a12c	drivers/scsi/ips.o

(gcc version 9.2.1, amd64)

Link: https://lore.kernel.org/r/20190906164522.5644-1-colin.king@canonical.comSigned-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent b23c640c
...@@ -498,7 +498,7 @@ ips_setup(char *ips_str) ...@@ -498,7 +498,7 @@ ips_setup(char *ips_str)
int i; int i;
char *key; char *key;
char *value; char *value;
IPS_OPTION options[] = { static const IPS_OPTION options[] = {
{"noi2o", &ips_force_i2o, 0}, {"noi2o", &ips_force_i2o, 0},
{"nommap", &ips_force_memio, 0}, {"nommap", &ips_force_memio, 0},
{"ioctlsize", &ips_ioctlsize, IPS_IOCTL_SIZE}, {"ioctlsize", &ips_ioctlsize, IPS_IOCTL_SIZE},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment