aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSimon Glass2013-03-11 01:08:13 -0500
committerSimon Glass2013-03-19 10:45:38 -0500
commit1e7133e99e27c4f02998e7eb87fa43424d48152b (patch)
tree79ee7855c8f870ee8da6a54952e3d48fd96ca028 /common
parent363464f9939633bd0dd5516e486e791bb395c745 (diff)
downloadu-boot-1e7133e99e27c4f02998e7eb87fa43424d48152b.tar.gz
u-boot-1e7133e99e27c4f02998e7eb87fa43424d48152b.tar.xz
u-boot-1e7133e99e27c4f02998e7eb87fa43424d48152b.zip
sf: Use unsigned type for buffers
The verify code is broken on archs with signed char. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_sf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/cmd_sf.c b/common/cmd_sf.c
index b1753587d3..3f0d414954 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)
369 * @param vbuf Verification buffer 369 * @param vbuf Verification buffer
370 * @return 0 if ok, -1 on error 370 * @return 0 if ok, -1 on error
371 */ 371 */
372static int spi_flash_test(struct spi_flash *flash, char *buf, ulong len, 372static int spi_flash_test(struct spi_flash *flash, uint8_t *buf, ulong len,
373 ulong offset, char *vbuf) 373 ulong offset, uint8_t *vbuf)
374{ 374{
375 struct test_info test; 375 struct test_info test;
376 int i; 376 int i;
@@ -431,9 +431,9 @@ static int do_spi_flash_test(int argc, char * const argv[])
431{ 431{
432 unsigned long offset; 432 unsigned long offset;
433 unsigned long len; 433 unsigned long len;
434 char *buf = (char *)CONFIG_SYS_TEXT_BASE; 434 uint8_t *buf = (uint8_t *)CONFIG_SYS_TEXT_BASE;
435 char *endp; 435 char *endp;
436 char *vbuf; 436 uint8_t *vbuf;
437 int ret; 437 int ret;
438 438
439 offset = simple_strtoul(argv[1], &endp, 16); 439 offset = simple_strtoul(argv[1], &endp, 16);