Skip to contentSkip to conversation

spi/stmicro: fix debug() display of cmd

PATCH New Mike Frysinger 2 participants 2 messages Dec 11, 2008 – Dec 15, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi/stmicro: fix debug() display of cmd

The stmicro_wait_ready() func tries to show the actual opcode that was sent to the device, but instead it displays the array pointer. Fix it to pull out the opcode from the start of the array.

---
 drivers/mtd/spi/stmicro.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/spi/stmicro.c +1 -1
index b8b835a..86324e4 100644
@@ -137,7 +137,7 @@ static int stmicro_wait_ready(struct spi_flash *flash, unsigned long timeout)
 
 	ret = spi_xfer(spi, 32, &cmd[0], NULL, SPI_XFER_BEGIN);
 	if (ret) {
-		debug("SF: Failed to send command %02x: %d\n", cmd, ret);
+		debug("SF: Failed to send command %02x: %d\n", cmd[0], ret);
 		return ret;
 	}
 
Signature · 1 line
1.6.0.4
#1 lore raw

PATCH 1/1 spi/stmicro: fix debug() display of cmd

Dear Mike Frysinger,

Quoted 8 lines · In message <[email protected]> you wrote:

The stmicro_wait_ready() func tries to show the actual opcode that was sent to the device, but instead it displays the array pointer. Fix it to pull out the opcode from the start of the array.

---
 drivers/mtd/spi/stmicro.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I've got a bad feeling about this.