diff mbox

lib/flash: Update type of size field

Message ID 20170823013855.14978-1-sam@mendozajonas.com
State Accepted
Headers show

Commit Message

Sam Mendoza-Jonas Aug. 23, 2017, 1:38 a.m. UTC
Skiboot commit c043065 "flash: Make size 64 bit safe" updated the
prototype of blocklevel_get_info() to use a uint64_t for the size
parameter. Update our usage to reflect this.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
---
 lib/flash/flash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Cyril Bur Aug. 24, 2017, 12:25 a.m. UTC | #1
On Wed, 2017-08-23 at 11:38 +1000, Samuel Mendoza-Jonas wrote:
> Skiboot commit c043065 "flash: Make size 64 bit safe" updated the
> prototype of blocklevel_get_info() to use a uint64_t for the size
> parameter. Update our usage to reflect this.
> 
> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>

Reviewed-by: Cyril Bur <cyrilbur@gmail.com>

> ---
>  lib/flash/flash.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/flash/flash.c b/lib/flash/flash.c
> index 1384118..464b876 100644
> --- a/lib/flash/flash.c
> +++ b/lib/flash/flash.c
> @@ -36,7 +36,7 @@ struct flash_info {
>  	/* Device information */
>  	struct blocklevel_device	*bl;
>  	struct ffs_handle		*ffs;
> -	uint32_t			size;	/* raw size of partition */
> +	uint64_t			size;	/* raw size of partition */
>  	const char			*path;
>  	bool				ecc;
>  	uint32_t			erase_granule;
> @@ -124,7 +124,7 @@ static struct flash_info *flash_setup_buffer(void *ctx, const char *partition)
>  
>  	pb_debug("%s Details\n", partition);
>  	pb_debug("\tName\t\t%s\n", info->path);
> -	pb_debug("\tFlash Size\t%u\n", info->size);
> +	pb_debug("\tFlash Size\t%lu\n", info->size);
>  	pb_debug("\tGranule\t\t%u\n", info->erase_granule);
>  	pb_debug("\tECC\t\t%s\n", info->ecc ? "Protected" : "Unprotected");
>  	pb_debug("\tCurrent Side info:\n");
diff mbox

Patch

diff --git a/lib/flash/flash.c b/lib/flash/flash.c
index 1384118..464b876 100644
--- a/lib/flash/flash.c
+++ b/lib/flash/flash.c
@@ -36,7 +36,7 @@  struct flash_info {
 	/* Device information */
 	struct blocklevel_device	*bl;
 	struct ffs_handle		*ffs;
-	uint32_t			size;	/* raw size of partition */
+	uint64_t			size;	/* raw size of partition */
 	const char			*path;
 	bool				ecc;
 	uint32_t			erase_granule;
@@ -124,7 +124,7 @@  static struct flash_info *flash_setup_buffer(void *ctx, const char *partition)
 
 	pb_debug("%s Details\n", partition);
 	pb_debug("\tName\t\t%s\n", info->path);
-	pb_debug("\tFlash Size\t%u\n", info->size);
+	pb_debug("\tFlash Size\t%lu\n", info->size);
 	pb_debug("\tGranule\t\t%u\n", info->erase_granule);
 	pb_debug("\tECC\t\t%s\n", info->ecc ? "Protected" : "Unprotected");
 	pb_debug("\tCurrent Side info:\n");