summaryrefslogtreecommitdiffstats
path: root/sb600spi.c
diff options
context:
space:
mode:
authorMathias Krause <mathias.krause@secunet.com>2011-01-17 07:50:42 +0000
committerMathias Krause <mathias.krause@secunet.com>2011-01-17 07:50:42 +0000
commit056d725a54c902f7787d355bffe284003feaaa79 (patch)
tree9de9787987eb6a3374e18835b196b7ac6cb9ad19 /sb600spi.c
parent1b75c65ac7b8231cbbaef8bad2a23601e81f63b5 (diff)
downloadflashrom-056d725a54c902f7787d355bffe284003feaaa79.zip
flashrom-056d725a54c902f7787d355bffe284003feaaa79.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). Corresponding to flashrom svn r1252. Signed-off-by: Mathias Krause <mathias.krause@secunet.com> Acked-by: Stefan Reinauer <stepan@coreboot.org>
Diffstat (limited to 'sb600spi.c')
-rw-r--r--sb600spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sb600spi.c b/sb600spi.c
index 4e3e079..845cf58 100644
--- a/sb600spi.c
+++ b/sb600spi.c
@@ -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"
};
OpenPOWER on IntegriCloud