mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
cmd_sf.c: fix printf() length modifier
size_t is not always 'unsigned int', use corret length modifer. This patch fixes following warning: ---8<--- cmd_sf.c: In function 'spi_flash_update_block': cmd_sf.c:130: warning: format '%#x' expects type 'unsigend int', but argument 4 has type 'size_t' cmd_sf.c:135: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t' --->8--- Signed-off-by: Andreas Bießmann <biessmann@corscience.de> cc: Mike Frysinger <vapier@gentoo.org> cc: Thomas Chou <thomas@wytron.com.tw> Acked-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
068af6f843
commit
a97f6efdb1
1 changed files with 2 additions and 2 deletions
|
@ -127,12 +127,12 @@ static int do_spi_flash_probe(int argc, char * const argv[])
|
|||
static const char *spi_flash_update_block(struct spi_flash *flash, u32 offset,
|
||||
size_t len, const char *buf, char *cmp_buf, size_t *skipped)
|
||||
{
|
||||
debug("offset=%#x, sector_size=%#x, len=%#x\n",
|
||||
debug("offset=%#x, sector_size=%#x, len=%#zx\n",
|
||||
offset, flash->sector_size, len);
|
||||
if (spi_flash_read(flash, offset, len, cmp_buf))
|
||||
return "read";
|
||||
if (memcmp(cmp_buf, buf, len) == 0) {
|
||||
debug("Skip region %x size %x: no change\n",
|
||||
debug("Skip region %x size %zx: no change\n",
|
||||
offset, len);
|
||||
*skipped += len;
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue