From e31d721469a37bd5784b86ffcd2318108a796616 Mon Sep 17 00:00:00 2001 From: Nikolai Artemiev Date: Mon, 28 Nov 2022 17:40:56 +1100 Subject: tree/: Make probe_opcode() flashctx argument const Probing an opcode generally shouldn't involve mutating the flashctx state and currently no probe_opcode functions do that. Make the flashctx arg const so that call sites don't need to have a non-const pointer. BUG=b:253715389,b:253713774 BRANCH=none TEST=ninja test Change-Id: I19e98be50d682de2d2715417f8b7b8c62b871617 Signed-off-by: Nikolai Artemiev Reviewed-on: https://review.coreboot.org/c/flashrom/+/70030 Reviewed-by: Angel Pons Reviewed-by: Edward O'Callaghan Tested-by: build bot (Jenkins) --- ichspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ichspi.c') diff --git a/ichspi.c b/ichspi.c index 62d1799b6..4588502a6 100644 --- a/ichspi.c +++ b/ichspi.c @@ -1661,7 +1661,7 @@ static int ich_spi_send_multicommand(const struct flashctx *flash, return ret; } -static bool ich_spi_probe_opcode(struct flashctx *flash, uint8_t opcode) +static bool ich_spi_probe_opcode(const struct flashctx *flash, uint8_t opcode) { return find_opcode(curopcodes, opcode) >= 0; } -- cgit v1.2.3