diff options
author | krause <krause@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2011-01-17 07:50:42 +0000 |
---|---|---|
committer | krause <krause@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2011-01-17 07:50:42 +0000 |
commit | 363dee978e43fd6ca776c2d43fe6b12fec4e3911 (patch) | |
tree | 9de9787987eb6a3374e18835b196b7ac6cb9ad19 /sb600spi.c | |
parent | 8afaf634a5b34fcd9794ac201819af4010611ef1 (diff) | |
download | flashrom-363dee978e43fd6ca776c2d43fe6b12fec4e3911.tar.gz |
This patch reduces the stack usage by declaring 'const' stack variables
as 'static const' so they end up in the .rodata section instead of being
copied from there to the stack for every invocation of the corresponding
function. As a plus we end up in having a smaller binary as the "copy
from .rodata to stack" code isn't emitted by the compiler any more
(roughly -100 bytes).
Signed-off-by: Mathias Krause <mathias.krause@secunet.com>
Acked-by: Stefan Reinauer <stepan@coreboot.org>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1252 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'sb600spi.c')
-rw-r--r-- | sb600spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -208,7 +208,7 @@ int sb600_probe_spi(struct pci_dev *dev) struct pci_dev *smbus_dev; uint32_t tmp; uint8_t reg; - const char *speed_names[4] = { + static const char *const speed_names[4] = { "Reserved", "33", "22", "16.5" }; |