mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +02:00
tree/: Drop default_spi_probe_opcode for NULL case
A NULL func pointer is necessary and sufficient for the condition `NULL func pointer => true' as to not need this boilerplate as it implies default behaviour of a supported opcode within the `check_block_eraser()` match supported loop. Ran; ``` $ find . -name '*.[c,h]' -exec sed -i '/.probe_opcode = default_spi_probe_opcode,/d' '{}' \; ``` Change-Id: Id502c5d2596ad1db52faf05723083620e4c52c12 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/70264 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
This commit is contained in:

committed by
Thomas Heijligen

parent
c66d2bd1ca
commit
e1f30bbce7
@ -312,7 +312,7 @@ struct spi_master {
|
||||
int (*write_256)(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
|
||||
int (*write_aai)(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
|
||||
int (*shutdown)(void *data);
|
||||
bool (*probe_opcode)(const struct flashctx *flash, uint8_t opcode);
|
||||
bool (*probe_opcode)(const struct flashctx *flash, uint8_t opcode); /* NULL func implies true. */
|
||||
void (*delay) (const struct flashctx *flash, unsigned int usecs);
|
||||
void (*get_region)(const struct flashctx *flash, unsigned int addr, struct flash_region *region);
|
||||
void *data;
|
||||
@ -321,7 +321,6 @@ struct spi_master {
|
||||
int default_spi_read(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
|
||||
int default_spi_write_256(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
|
||||
int default_spi_write_aai(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
|
||||
bool default_spi_probe_opcode(const struct flashctx *flash, uint8_t opcode);
|
||||
int register_spi_master(const struct spi_master *mst, void *data);
|
||||
|
||||
/* The following enum is needed by ich_descriptor_tool and ich* code as well as in chipset_enable.c. */
|
||||
|
Reference in New Issue
Block a user