All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: spi-amd: remove unused variable
@ 2020-04-28 21:37 Arnd Bergmann
  2020-04-29  9:52 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2020-04-28 21:37 UTC (permalink / raw)
  To: Sanjay R Mehta, Mark Brown; +Cc: Arnd Bergmann, linux-spi, linux-kernel

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

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


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

* Re: [PATCH] spi: spi-amd: remove unused variable
  2020-04-28 21:37 [PATCH] spi: spi-amd: remove unused variable Arnd Bergmann
@ 2020-04-29  9:52 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2020-04-29  9:52 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Sanjay R Mehta, linux-spi, linux-kernel

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

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.

[-- 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:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 21:37 [PATCH] spi: spi-amd: remove unused variable Arnd Bergmann
2020-04-29  9:52 ` 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.