From 9eb4d0a0692ca960d6ed1ad14c11e27b32e1f419 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Sat, 10 Nov 2018 11:27:02 +0100 Subject: sb/amd: Remove dead assignment in SPI driver Value stored to 'cmd' is never read Change-Id: I794b6e12f5af272705cd996f7ca5099e9b9dbfc7 Found-by: scan-build from clang 6 Signed-off-by: Paul Menzel Reviewed-on: https://review.coreboot.org/29568 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Patrick Georgi --- src/southbridge/amd/agesa/hudson/spi.c | 2 +- src/southbridge/amd/cimx/sb800/spi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/southbridge/amd/agesa/hudson/spi.c b/src/southbridge/amd/agesa/hudson/spi.c index 74c4711536..94846514ce 100644 --- a/src/southbridge/amd/agesa/hudson/spi.c +++ b/src/southbridge/amd/agesa/hudson/spi.c @@ -132,7 +132,7 @@ static int spi_ctrlr_xfer(const struct spi_slave *slave, const void *dout, reset_internal_fifo_pointer(); /* Skip the bytes we sent. */ for (count = 0; count < bytesout; count++) { - cmd = spi_read(SPI_REG_FIFO); + spi_read(SPI_REG_FIFO); } for (count = 0; count < bytesin; count++, din++) { diff --git a/src/southbridge/amd/cimx/sb800/spi.c b/src/southbridge/amd/cimx/sb800/spi.c index ec18454cc7..574c0621db 100644 --- a/src/southbridge/amd/cimx/sb800/spi.c +++ b/src/southbridge/amd/cimx/sb800/spi.c @@ -95,7 +95,7 @@ static int spi_ctrlr_xfer(const struct spi_slave *slave, const void *dout, reset_internal_fifo_pointer(); /* Skip the bytes we sent. */ for (count = 0; count < bytesout; count++) { - cmd = read8((void *)(spibar + 0x0C)); + read8((void *)(spibar + 0x0C)); } reset_internal_fifo_pointer(); -- cgit v1.2.3