Nico Huber has uploaded this change for review. ( https://review.coreboot.org/21803
Change subject: ichspi: Drop `dev` parameter from init functions ......................................................................
ichspi: Drop `dev` parameter from init functions
It's never used and has no clear contract (e.g. will the pointer stay valid beyond the call?).
Original-Change-Id: I0d4e7cc731364e86eff214b9022b842a577f9ef4 Original-Reviewed-on: https://review.coreboot.org/19460 Original-Tested-by: build bot (Jenkins) no-reply@coreboot.org Original-Reviewed-by: Philippe Mathieu-Daudé philippe.mathieu.daude@gmail.com Original-Reviewed-by: Stefan Reinauer stefan.reinauer@coreboot.org
Change-Id: I01978e3e45332021f8967034bbaa907ef5f48d19 Signed-off-by: Nico Huber nico.huber@secunet.com --- M chipset_enable.c M ichspi.c M programmer.h 3 files changed, 8 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/03/21803/1
diff --git a/chipset_enable.c b/chipset_enable.c index 208cd3a..83c470f 100644 --- a/chipset_enable.c +++ b/chipset_enable.c @@ -718,7 +718,7 @@ void *spibar = rcrb + spibar_offset;
/* This adds BUS_SPI */ - int ret_spi = ich_init_spi(dev, spibar, ich_generation); + int ret_spi = ich_init_spi(spibar, ich_generation); if (ret_spi == ERROR_FATAL) return ret_spi; @@ -846,7 +846,7 @@ */ enable_flash_ich_bios_cntl_memmapped(ich_generation, spibar + 0xFC);
- int ret_spi = ich_init_spi(dev, spibar, ich_generation); + int ret_spi = ich_init_spi(spibar, ich_generation); if (ret_spi == ERROR_FATAL) return ret_spi;
@@ -949,12 +949,12 @@ return ERROR_FATAL; }
- return via_init_spi(dev, spi0_mm_base); + return via_init_spi(spi0_mm_base); }
static int enable_flash_vt8237s_spi(struct pci_dev *dev, const char *name) { - return via_init_spi(dev, pci_read_long(dev, 0xbc) << 8); + return via_init_spi(pci_read_long(dev, 0xbc) << 8); }
static int enable_flash_cs5530(struct pci_dev *dev, const char *name) diff --git a/ichspi.c b/ichspi.c index e1395ee..218e3b1 100644 --- a/ichspi.c +++ b/ichspi.c @@ -1561,7 +1561,7 @@ .erase = ich_hwseq_block_erase, };
-int ich_init_spi(struct pci_dev *dev, void *spibar, enum ich_chipset ich_gen) +int ich_init_spi(void *spibar, enum ich_chipset ich_gen) { int i; uint16_t tmp2; @@ -1828,7 +1828,7 @@ .write_aai = default_spi_write_aai, };
-int via_init_spi(struct pci_dev *dev, uint32_t mmio_base) +int via_init_spi(uint32_t mmio_base) { int i;
diff --git a/programmer.h b/programmer.h index 9beaf98..fd9da96 100644 --- a/programmer.h +++ b/programmer.h @@ -655,8 +655,8 @@ /* ichspi.c */ #if CONFIG_INTERNAL == 1 extern uint32_t ichspi_bbar; -int ich_init_spi(struct pci_dev *dev, void *spibar, enum ich_chipset ich_generation); -int via_init_spi(struct pci_dev *dev, uint32_t mmio_base); +int ich_init_spi(void *spibar, enum ich_chipset ich_generation); +int via_init_spi(uint32_t mmio_base);
/* amd_imc.c */ int amd_imc_shutdown(struct pci_dev *dev);