diff mbox series

spi: spi-amd: remove unused variable

Message ID 20200428213711.3643464-1-arnd@arndb.de (mailing list archive)
State New, archived
Headers show
Series spi: spi-amd: remove unused variable | expand

Commit Message

Arnd Bergmann April 28, 2020, 9:37 p.m. UTC
This variable was defined in the original version of this file but
never used, so remove it to avoid the warning:

drivers/spi/spi-amd.c: In function 'amd_spi_fifo_xfer':
drivers/spi/spi-amd.c:171:17: error: unused variable 'opcode' [-Werror=unused-variable]
  171 |  u8 cmd_opcode, opcode = 0;

Fixes: bbb336f39efc ("spi: spi-amd: Add AMD SPI controller driver support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/spi/spi-amd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown April 29, 2020, 9:52 a.m. UTC | #1
On Tue, Apr 28, 2020 at 11:37:02PM +0200, Arnd Bergmann wrote:
> This variable was defined in the original version of this file but
> never used, so remove it to avoid the warning:

This is already fixed.
diff mbox series

Patch

diff --git a/drivers/spi/spi-amd.c b/drivers/spi/spi-amd.c
index 0d9debe1386e..c5a16dd44fa3 100644
--- a/drivers/spi/spi-amd.c
+++ b/drivers/spi/spi-amd.c
@@ -168,7 +168,7 @@  static inline int amd_spi_fifo_xfer(struct amd_spi *amd_spi,
 {
 	struct spi_master *master = amd_spi->master;
 	struct spi_transfer *xfer = NULL;
-	u8 cmd_opcode, opcode = 0;
+	u8 cmd_opcode;
 	u8 *buf = NULL;
 	u32 m_cmd = 0;
 	u32 i = 0;