mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 15:12:36 +02:00
ichspi.c: make REGWRITE* macros safer
'+' does have a quite high precedence so "calling" those macros with a term including weaker operators in the off parameter may have unexpected consequences. Corresponding to flashrom svn r1359. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
parent
5368dca436
commit
ccd92a19d4
6
ichspi.c
6
ichspi.c
@ -216,9 +216,9 @@ static uint16_t REGREAD8(int X)
|
||||
return mmio_readb(ich_spibar + X);
|
||||
}
|
||||
|
||||
#define REGWRITE32(off,val) mmio_writel(val, ich_spibar+off)
|
||||
#define REGWRITE16(off,val) mmio_writew(val, ich_spibar+off)
|
||||
#define REGWRITE8(off,val) mmio_writeb(val, ich_spibar+off)
|
||||
#define REGWRITE32(off, val) mmio_writel(val, ich_spibar+(off))
|
||||
#define REGWRITE16(off, val) mmio_writew(val, ich_spibar+(off))
|
||||
#define REGWRITE8(off, val) mmio_writeb(val, ich_spibar+(off))
|
||||
|
||||
/* Common SPI functions */
|
||||
static int find_opcode(OPCODES *op, uint8_t opcode);
|
||||
|
Loading…
x
Reference in New Issue
Block a user