* [PATCH] scsi: ips: make array 'options' static const, makes object smaller
@ 2019-09-06 16:45 Colin King
2019-10-01 2:46 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-09-06 16:45 UTC (permalink / raw)
To: Adaptec OEM Raid Solutions, James E . J . Bottomley,
Martin K . Petersen, linux-scsi
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/scsi/ips.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index e8bc8d328bab..f25672982c5f 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -498,7 +498,7 @@ ips_setup(char *ips_str)
int i;
char *key;
char *value;
- IPS_OPTION options[] = {
+ static const IPS_OPTION options[] = {
{"noi2o", &ips_force_i2o, 0},
{"nommap", &ips_force_memio, 0},
{"ioctlsize", &ips_ioctlsize, IPS_IOCTL_SIZE},
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] scsi: ips: make array 'options' static const, makes object smaller
2019-09-06 16:45 [PATCH] scsi: ips: make array 'options' static const, makes object smaller Colin King
@ 2019-10-01 2:46 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2019-10-01 2:46 UTC (permalink / raw)
To: Colin King
Cc: Adaptec OEM Raid Solutions, James E . J . Bottomley,
Martin K . Petersen, linux-scsi, kernel-janitors, linux-kernel
Colin,
> Don't populate the array 'options' on the stack but instead make it
> static const. Makes the object code smaller by 143 bytes.
Applied to 5.5/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-01 2:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-06 16:45 [PATCH] scsi: ips: make array 'options' static const, makes object smaller Colin King
2019-10-01 2:46 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox