From eb1b1f6f7dc27bb978a8e4577c83b722f770af1e Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Fri, 12 Aug 2022 11:24:11 +1000 Subject: flashrom.c: flatten out write_buf_to_include_args() write_buf_to_include_args() does not need the whole flashctx, rather it works with a fix layout and buffer. Just pass what state is actually required. BUG=b:242246291 TEST=builds Change-Id: I885c4395356eef27746c66300233f07f4718ccdf Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/flashrom/+/66644 Reviewed-by: Evan Benn Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) Reviewed-by: Nikolai Artemiev Reviewed-by: Sam McNally Reviewed-by: Thomas Heijligen --- include/flash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/flash.h b/include/flash.h index 3fedb2b6..d5001c1d 100644 --- a/include/flash.h +++ b/include/flash.h @@ -425,7 +425,7 @@ int selfcheck(void); int read_buf_from_file(unsigned char *buf, unsigned long size, const char *filename); int read_buf_from_include_args(const struct flashrom_layout *const layout, unsigned char *buf); int write_buf_to_file(const unsigned char *buf, unsigned long size, const char *filename); -int write_buf_to_include_args(const struct flashctx *const flash, unsigned char *buf); +int write_buf_to_include_args(const struct flashrom_layout *const layout, unsigned char *buf); int prepare_flash_access(struct flashctx *, bool read_it, bool write_it, bool erase_it, bool verify_it); void finalize_flash_access(struct flashctx *); int register_chip_restore(chip_restore_fn_cb_t func, struct flashctx *flash, uint8_t status); -- cgit v1.2.3