All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: spi-amd: remove unused variable 'opcode'
@ 2020-04-29  1:30 Zheng Bin
  2020-04-29  9:54 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Zheng Bin @ 2020-04-29  1:30 UTC (permalink / raw)
  To: sanju.mehta, broonie, linux-spi; +Cc: zhengbin13

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(-)

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] spi: spi-amd: remove unused variable 'opcode'
  2020-04-29  1:30 [PATCH] spi: spi-amd: remove unused variable 'opcode' Zheng Bin
@ 2020-04-29  9:54 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2020-04-29  9:54 UTC (permalink / raw)
  To: Zheng Bin; +Cc: sanju.mehta, linux-spi

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

On Wed, Apr 29, 2020 at 09:30:18AM +0800, Zheng Bin wrote:
> Fixes gcc '-Wunused-variable' warning:
> 
> drivers/spi/spi-amd.c:171:17: warning: unused variable ‘opcode’ [-Wunused-variable]

This has already been fixed.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-29  9:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29  1:30 [PATCH] spi: spi-amd: remove unused variable 'opcode' Zheng Bin
2020-04-29  9:54 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.