diff mbox

[U-Boot,v2,15/15] sf: Use unsigned type for buffers

Message ID 1363018093-28979-16-git-send-email-sjg@chromium.org
State Accepted, archived
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass March 11, 2013, 4:08 p.m. UTC
The verify code is broken on archs with signed char. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v2:
- Add new patch to use unsigned type for buffers in 'sf test'

 common/cmd_sf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/common/cmd_sf.c b/common/cmd_sf.c
index b175358..3f0d414 100644
--- a/common/cmd_sf.c
+++ b/common/cmd_sf.c
@@ -369,8 +369,8 @@  static void spi_test_next_stage(struct test_info *test)
  * @param vbuf		Verification buffer
  * @return 0 if ok, -1 on error
  */
-static int spi_flash_test(struct spi_flash *flash, char *buf, ulong len,
-			   ulong offset, char *vbuf)
+static int spi_flash_test(struct spi_flash *flash, uint8_t *buf, ulong len,
+			   ulong offset, uint8_t *vbuf)
 {
 	struct test_info test;
 	int i;
@@ -431,9 +431,9 @@  static int do_spi_flash_test(int argc, char * const argv[])
 {
 	unsigned long offset;
 	unsigned long len;
-	char *buf = (char *)CONFIG_SYS_TEXT_BASE;
+	uint8_t *buf = (uint8_t *)CONFIG_SYS_TEXT_BASE;
 	char *endp;
-	char *vbuf;
+	uint8_t *vbuf;
 	int ret;
 
 	offset = simple_strtoul(argv[1], &endp, 16);