diff mbox series

[1/3] fastboot: sparse: remove redundant argument to write_sparse_image

Message ID 1522996492-23274-1-git-send-email-jassisinghbrar@gmail.com
State New
Headers show
Series Enable mmc to write sparse images | expand

Commit Message

Jassi Brar April 6, 2018, 6:34 a.m. UTC
From: Jassi Brar <jaswinder.singh@linaro.org>

'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        | 3 +--
 common/fb_nand.c       | 3 +--
 common/image-sparse.c  | 2 +-
 include/image-sparse.h | 2 +-
 4 files changed, 4 insertions(+), 6 deletions(-)

Comments

Tom Rini May 8, 2018, 5:15 p.m. UTC | #1
On Fri, Apr 06, 2018 at 12:04:52PM +0530, jassisinghbrar@gmail.com wrote:

> From: Jassi Brar <jaswinder.singh@linaro.org>

> 

> 'sz' has no use for write_sparse_image, remove it simplifying the api.

> 

> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>


Applied to u-boot/master, thanks!

-- 
Tom
diff mbox series

Patch

diff --git a/common/fb_mmc.c b/common/fb_mmc.c
index cf5b77c..6993309 100644
--- a/common/fb_mmc.c
+++ b/common/fb_mmc.c
@@ -343,8 +343,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 aa28046..6130612 100644
--- a/common/fb_nand.c
+++ b/common/fb_nand.c
@@ -180,8 +180,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 b0cc500..d92d0f3 100644
--- a/include/image-sparse.h
+++ b/include/image-sparse.h
@@ -37,4 +37,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);