fastboot: sparse: remove redundant argument to write_sparse_image
authorJassi Brar <jaswinder.singh@linaro.org>
Fri, 6 Apr 2018 06:34:52 +0000 (12:04 +0530)
committerTom Rini <trini@konsulko.com>
Tue, 8 May 2018 00:57:51 +0000 (20:57 -0400)
'sz' has no use for write_sparse_image, remove it simplifying the api.

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
common/fb_mmc.c
common/fb_nand.c
common/image-sparse.c
include/image-sparse.h

index b748b15f63819d077d7485dd6004b5769c8a7f9c..234ce83b802a8da4f28aaa40522ee47d63d125cf 100644 (file)
@@ -342,8 +342,7 @@ void fb_mmc_flash_write(const char *cmd, void *download_buffer,
                       sparse.start);
 
                sparse.priv = &sparse_priv;
-               write_sparse_image(&sparse, cmd, download_buffer,
-                                  download_bytes);
+               write_sparse_image(&sparse, cmd, download_buffer);
        } else {
                write_raw_image(dev_desc, &info, cmd, download_buffer,
                                download_bytes);
index 3df0f7287e1609e38b33905dae07c2effd1bb1b8..d7d9eb08f696ced224880753a5ada465e9cd4590 100644 (file)
@@ -179,8 +179,7 @@ void fb_nand_flash_write(const char *cmd, void *download_buffer,
                       sparse.start);
 
                sparse.priv = &sparse_priv;
-               write_sparse_image(&sparse, cmd, download_buffer,
-                                  download_bytes);
+               write_sparse_image(&sparse, cmd, download_buffer);
        } else {
                printf("Flashing raw image at offset 0x%llx\n",
                       part->offset);
index ddf5772cf825ca6ae2f74542491b5e0ae9e76235..8ebd647e337d76653f96e3f053adba1d67bbcc9e 100644 (file)
@@ -51,7 +51,7 @@
 
 void write_sparse_image(
                struct sparse_storage *info, const char *part_name,
-               void *data, unsigned sz)
+               void *data)
 {
        lbaint_t blk;
        lbaint_t blkcnt;
index 4d1f91048787d0e489b8885cf056111373c1b929..72f4036d813d949fdacea72794eac2659fa17eaa 100644 (file)
@@ -36,4 +36,4 @@ static inline int is_sparse_image(void *buf)
 }
 
 void write_sparse_image(struct sparse_storage *info, const char *part_name,
-                       void *data, unsigned sz);
+                       void *data);