From e1f30bbce7a603d518ecec9d7e6885719f396719 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Tue, 20 Dec 2022 12:33:13 +1100 Subject: 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 Reviewed-on: https://review.coreboot.org/c/flashrom/+/70264 Tested-by: build bot (Jenkins) Reviewed-by: Thomas Heijligen Reviewed-by: Anastasia Klimchuk --- sb600spi.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'sb600spi.c') diff --git a/sb600spi.c b/sb600spi.c index 2e6c2eca..df7caedb 100644 --- a/sb600spi.c +++ b/sb600spi.c @@ -604,7 +604,6 @@ static const struct spi_master spi_master_sb600 = { .read = default_spi_read, .write_256 = default_spi_write_256, .shutdown = sb600spi_shutdown, - .probe_opcode = default_spi_probe_opcode, }; static const struct spi_master spi_master_yangtze = { @@ -616,7 +615,6 @@ static const struct spi_master spi_master_yangtze = { .read = default_spi_read, .write_256 = default_spi_write_256, .shutdown = sb600spi_shutdown, - .probe_opcode = default_spi_probe_opcode, }; static const struct spi_master spi_master_promontory = { @@ -628,7 +626,6 @@ static const struct spi_master spi_master_promontory = { .read = promontory_read_memmapped, .write_256 = default_spi_write_256, .shutdown = sb600spi_shutdown, - .probe_opcode = default_spi_probe_opcode, }; int sb600_probe_spi(const struct programmer_cfg *cfg, struct pci_dev *dev) -- cgit v1.2.1