From 0332d5e3ad0ed7b9b6137f2e5f60d56d7ab9bf53 Mon Sep 17 00:00:00 2001 From: persmule Date: Mon, 30 Sep 2024 17:09:36 +0800 Subject: [PATCH] ichspi: const-correct POSSIBLE_OPCODES[] POSSIBLE_OPCODES[] is never modified, so mark it as read-only. Change-Id: I217f8a9e50b9e2e9f2731adec89a46780874c754 Signed-off-by: persmule Reviewed-on: https://review.coreboot.org/c/flashrom/+/84595 Tested-by: build bot (Jenkins) Reviewed-by: Anastasia Klimchuk Reviewed-by: Nikolai Artemiev --- ichspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ichspi.c b/ichspi.c index 358d9f473..d53e67176 100644 --- a/ichspi.c +++ b/ichspi.c @@ -399,7 +399,7 @@ static OPCODES O_ST_M25P = { * It is used to reprogram the chipset OPCODE table on-the-fly if an opcode * is needed which is currently not in the chipset OPCODE table */ -static OPCODE POSSIBLE_OPCODES[] = { +static const OPCODE POSSIBLE_OPCODES[] = { {JEDEC_BYTE_PROGRAM, SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS, 0}, // Write Byte {JEDEC_READ, SPI_OPCODE_TYPE_READ_WITH_ADDRESS, 0}, // Read Data {JEDEC_BE_D8, SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS, 0}, // Erase Sector