diff mbox series

spi: spi-amd: remove unused variable 'opcode'

Message ID 20200429013018.34046-1-zhengbin13@huawei.com
State New
Headers show
Series spi: spi-amd: remove unused variable 'opcode' | expand

Commit Message

Zheng Bin April 29, 2020, 1:30 a.m. UTC
Fixes gcc '-Wunused-variable' warning:

drivers/spi/spi-amd.c:171:17: warning: unused variable ‘opcode’ [-Wunused-variable]

It is introduced by commit bbb336f39efc ("spi: spi-amd:
Add AMD SPI controller driver support"), but never used,
so remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/spi/spi-amd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.26.0.106.g9fadedd
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;