diff mbox series

[U-Boot,1/3] cmd: cbfs: fix reading the end_of_rom pointer for 64bit archs

Message ID 20180215064012.28557-1-a.heider@gmail.com
State Accepted
Commit 33222c8a2cef36d0651d85100d9e0eadbe73884c
Delegated to: Simon Glass
Headers show
Series [U-Boot,1/3] cmd: cbfs: fix reading the end_of_rom pointer for 64bit archs | expand

Commit Message

Andre Heider Feb. 15, 2018, 6:40 a.m. UTC
The cast breaks the pointer on 64bit archs, so lets get rid of it.

Signed-off-by: Andre Heider <a.heider@gmail.com>
---
 cmd/cbfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexander Graf Feb. 21, 2018, 11:59 p.m. UTC | #1
On 15.02.18 07:40, Andre Heider wrote:
> The cast breaks the pointer on 64bit archs, so lets get rid of it.
> 
> Signed-off-by: Andre Heider <a.heider@gmail.com>

Reviewed-by: Alexander Graf <agraf@suse.de>


Alex

> ---
>  cmd/cbfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cmd/cbfs.c b/cmd/cbfs.c
> index 799ba01fcc..736f8c4527 100644
> --- a/cmd/cbfs.c
> +++ b/cmd/cbfs.c
> @@ -22,7 +22,7 @@ static int do_cbfs_init(cmd_tbl_t *cmdtp, int flag, int argc,
>  		return 0;
>  	}
>  	if (argc == 2) {
> -		end_of_rom = (int)simple_strtoul(argv[1], &ep, 16);
> +		end_of_rom = simple_strtoul(argv[1], &ep, 16);
>  		if (*ep) {
>  			puts("\n** Invalid end of ROM **\n");
>  			return 1;
>
Simon Glass April 1, 2018, 2:28 p.m. UTC | #2
On 22 February 2018 at 07:59, Alexander Graf <agraf@suse.de> wrote:
>
>
> On 15.02.18 07:40, Andre Heider wrote:
>> The cast breaks the pointer on 64bit archs, so lets get rid of it.
>>
>> Signed-off-by: Andre Heider <a.heider@gmail.com>
>
> Reviewed-by: Alexander Graf <agraf@suse.de>

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/cmd/cbfs.c b/cmd/cbfs.c
index 799ba01fcc..736f8c4527 100644
--- a/cmd/cbfs.c
+++ b/cmd/cbfs.c
@@ -22,7 +22,7 @@  static int do_cbfs_init(cmd_tbl_t *cmdtp, int flag, int argc,
 		return 0;
 	}
 	if (argc == 2) {
-		end_of_rom = (int)simple_strtoul(argv[1], &ep, 16);
+		end_of_rom = simple_strtoul(argv[1], &ep, 16);
 		if (*ep) {
 			puts("\n** Invalid end of ROM **\n");
 			return 1;