From 32d3154e5c9fe396cd78e30af64b7f26523a04b5 Mon Sep 17 00:00:00 2001 From: Jassi Brar Date: Fri, 6 Apr 2018 12:04:52 +0530 Subject: [PATCH] fastboot: sparse: remove redundant argument to write_sparse_image 'sz' has no use for write_sparse_image, remove it simplifying the api. Signed-off-by: Jassi Brar --- common/fb_mmc.c | 3 +-- common/fb_nand.c | 3 +-- common/image-sparse.c | 2 +- include/image-sparse.h | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/common/fb_mmc.c b/common/fb_mmc.c index b748b15..234ce83 100644 --- a/common/fb_mmc.c +++ b/common/fb_mmc.c @@ -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); diff --git a/common/fb_nand.c b/common/fb_nand.c index 3df0f72..d7d9eb0 100644 --- a/common/fb_nand.c +++ b/common/fb_nand.c @@ -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); diff --git a/common/image-sparse.c b/common/image-sparse.c index ddf5772..8ebd647 100644 --- a/common/image-sparse.c +++ b/common/image-sparse.c @@ -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; diff --git a/include/image-sparse.h b/include/image-sparse.h index 4d1f910..72f4036 100644 --- a/include/image-sparse.h +++ b/include/image-sparse.h @@ -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); -- 2.7.4