]> git.sur5r.net Git - u-boot/commitdiff
fastboot: Fix parameter types in _fb_nand_write
authorAlex Kiernan <alex.kiernan@gmail.com>
Tue, 29 May 2018 15:30:45 +0000 (15:30 +0000)
committerMarek Vasut <marex@denx.de>
Wed, 30 May 2018 09:59:21 +0000 (11:59 +0200)
Compiling on a 64 bit target the arguments to _fb_nand_write are
incompatible:

  drivers/fastboot/fb_nand.c: In function ‘_fb_nand_write’:
  drivers/fastboot/fb_nand.c:101:42: warning: passing argument 3 of ‘nand_write_skip_bad’ from incompatible pointer type [-Wincompatible-pointer-types]
    return nand_write_skip_bad(mtd, offset, &length, written,
                                          ^
  In file included from drivers/fastboot/fb_nand.c:16:0:
  include/nand.h:107:5: note: expected ‘size_t * {aka long unsigned int *}’ but argument is of type ‘unsigned int *’
   int nand_write_skip_bad(struct mtd_info *mtd, loff_t offset, size_t *length,
       ^~~~~~~~~~~~~~~~~~~

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/fastboot/fb_nand.c

index 2ee0d644e0c75a182f9701206c5b44b2853b6011..849a6f16a51dff49cc29dd7b23d7464283970bb0 100644 (file)
@@ -89,7 +89,7 @@ static int _fb_nand_erase(struct mtd_info *mtd, struct part_info *part)
 
 static int _fb_nand_write(struct mtd_info *mtd, struct part_info *part,
                          void *buffer, unsigned int offset,
-                         unsigned int length, size_t *written)
+                         size_t length, size_t *written)
 {
        int flags = WITH_WR_VERIFY;