cmd, fdt: fix working_fdt is set to wrong value
PATCH 1/1 cmd, fdt: fix working_fdt is set to wrong value
Being a long time u-boot developer, this is the first time I'm trying to get some fix for the open source code back to mainline. If anything wrong during the process, please be gentle :-) Thank you.
PATCH 1/1 cmd, fdt: fix working_fdt is set to wrong value
Hi Hua,
Quoted 31 lines · Hua Yanghao
Being a long time u-boot developer, this is the first time I'm trying to get some fix for the open source code back to mainline. If anything wrong during the process, please be gentle :-) Thank you.
From
225c8f8f2af4cf6092260e5c133d90096e2f3352Mon Sep 17 00:00:00 2001
From: Hua Yanghao <[email protected]>
Date: Mon, 22 Dec 2014 04:32:39 +0800
Subject: [PATCH 1/1] cmd, fdt: fixworking_fdtis set to wrong valueInstead of setting
working_fdttomap_sysmem(addr)(e.g. blob), it should be set to addr directly as insideset_working_fdt_addrit usesmap_sysmem(addr)again. To test: ./u-boot -d dts/dt.bin , then issue: fdt addr0x100, fdt print will then cause an segmentation fault. After this fix fdt print is functional.--- common/cmd_fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/cmd_fdt.c +1
-1@@ -123,7 +123,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])if (control) gd->fdt_blob = blob;else -set_working_fdt_addr (blob); +set_working_fdt_addr ((void *)addr);if (argc >=2 ) {
Quoted 1 line
int len;
I think maybe your patch generation is a bit broken as the indentation has been lost. If you don't have git send-email set up you should probably look at that, and use patman to send patches.
This change looks right apart from that. You could also look at changing the argument of set_working_fdt_addr() to ulong if you like.
Regards,
Simon
PATCH 1/1 cmd, fdt: fix working_fdt is set to wrong value
Hi Simon,
Thank you for the suggestion. I will set up git send-email and send a new patch for review.
For set_working_fdt_addr, a simple grep shows 2 other places (common/bootm.c common/image-fdt.c) is already using its parameter as void *. changing it to ulong will cause the other 2 places to use casting. Maybe just keep its current void * is already good enough.
Best Regards,
Yanghao
Quoted 45 lines · Simon Glass
Hi Hua,
Quoted 31 lines · Hua Yanghao
Being a long time u-boot developer, this is the first time I'm trying to get some fix for the open source code back to mainline. If anything wrong during the process, please be gentle :-) Thank you.
From
225c8f8f2af4cf6092260e5c133d90096e2f3352Mon Sep 17 00:00:00 2001
From: Hua Yanghao <[email protected]>
Date: Mon, 22 Dec 2014 04:32:39 +0800
Subject: [PATCH 1/1] cmd, fdt: fixworking_fdtis set to wrong valueInstead of setting
working_fdttomap_sysmem(addr)(e.g. blob), it should be set to addr directly as insideset_working_fdt_addrit usesmap_sysmem(addr)again. To test: ./u-boot -d dts/dt.bin , then issue: fdt addr0x100, fdt print will then cause an segmentation fault. After this fix fdt print is functional.--- common/cmd_fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/cmd_fdt.c +1
-1@@ -123,7 +123,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])if (control) gd->fdt_blob = blob;else -set_working_fdt_addr (blob); +set_working_fdt_addr ((void *)addr);if (argc >=2 ) {Quoted 1 line
int len;
I think maybe your patch generation is a bit broken as the indentation has been lost. If you don't have git send-email set up you should probably look at that, and use patman to send patches.
This change looks right apart from that. You could also look at changing the argument of
set_working_fdt_addr()to ulong if you like.Regards,
Simon
PATCH 1/1 cmd, fdt: fix working_fdt is set to wrong value
By the way, which is the current branch you guys are working on? u-boot/master I assume?
Quoted 57 lines · Hua Yanghao
Hi Simon,
Thank you for the suggestion. I will set up git send-email and send a new patch for review.
Forset_working_fdt_addr, a simple grep shows 2 other places (common/bootm.ccommon/image-fdt.c) is already using its parameter as void *. changing it to ulong will cause the other 2 places to use casting. Maybe just keep its current void * is already good enough.Best Regards,
YanghaoQuoted 45 lines · Simon Glass
Hi Hua,
Quoted 31 lines · Hua Yanghao
Being a long time u-boot developer, this is the first time I'm trying to get some fix for the open source code back to mainline. If anything wrong during the process, please be gentle :-) Thank you.
From
225c8f8f2af4cf6092260e5c133d90096e2f3352Mon Sep 17 00:00:00 2001
From: Hua Yanghao <[email protected]>
Date: Mon, 22 Dec 2014 04:32:39 +0800
Subject: [PATCH 1/1] cmd, fdt: fixworking_fdtis set to wrong valueInstead of setting
working_fdttomap_sysmem(addr)(e.g. blob), it should be set to addr directly as insideset_working_fdt_addrit usesmap_sysmem(addr)again. To test: ./u-boot -d dts/dt.bin , then issue: fdt addr0x100, fdt print will then cause an segmentation fault. After this fix fdt print is functional.--- common/cmd_fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/cmd_fdt.c +1
-1@@ -123,7 +123,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])if (control) gd->fdt_blob = blob;else -set_working_fdt_addr (blob); +set_working_fdt_addr ((void *)addr);if (argc >=2 ) {Quoted 1 line
int len;
I think maybe your patch generation is a bit broken as the indentation has been lost. If you don't have git send-email set up you should probably look at that, and use patman to send patches.
This change looks right apart from that. You could also look at changing the argument of
set_working_fdt_addr()to ulong if you like.Regards,
Simon
PATCH 1/1 cmd, fdt: fix working_fdt is set to wrong value
Hi,
Quoted 2 lines · Hua Yanghao
By the way, which is the current branch you guys are working on? u-boot/master I assume?
Yes that's right.
- Simon
Quoted 59 lines · Hua Yanghao
Quoted 57 lines
Hi Simon,
Thank you for the suggestion. I will set up git send-email and send a new patch for review.
Forset_working_fdt_addr, a simple grep shows 2 other places (common/bootm.ccommon/image-fdt.c) is already using its parameter as void *. changing it to ulong will cause the other 2 places to use casting. Maybe just keep its current void * is already good enough.Best Regards,
YanghaoQuoted 45 lines · Simon Glass
Hi Hua,
Quoted 31 lines · Hua Yanghao
Being a long time u-boot developer, this is the first time I'm trying to get some fix for the open source code back to mainline. If anything wrong during the process, please be gentle :-) Thank you.
From
225c8f8f2af4cf6092260e5c133d90096e2f3352Mon Sep 17 00:00:00 2001
From: Hua Yanghao <[email protected]>
Date: Mon, 22 Dec 2014 04:32:39 +0800
Subject: [PATCH 1/1] cmd, fdt: fixworking_fdtis set to wrong valueInstead of setting
working_fdttomap_sysmem(addr)(e.g. blob), it should be set to addr directly as insideset_working_fdt_addrit usesmap_sysmem(addr)again. To test: ./u-boot -d dts/dt.bin , then issue: fdt addr0x100, fdt print will then cause an segmentation fault. After this fix fdt print is functional.--- common/cmd_fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/cmd_fdt.c +1
-1@@ -123,7 +123,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])if (control) gd->fdt_blob = blob;else -set_working_fdt_addr (blob); +set_working_fdt_addr ((void *)addr);if (argc >=2 ) {Quoted 1 line
int len;
I think maybe your patch generation is a bit broken as the indentation has been lost. If you don't have git send-email set up you should probably look at that, and use patman to send patches.
This change looks right apart from that. You could also look at changing the argument of
set_working_fdt_addr()to ulong if you like.Regards,
Simon
PATCH 1/1 cmd, fdt: fix working_fdt is set to wrong value
In reply to Hua YanghaoQuoted 5 lines · Hua Yanghao
Being a long time u-boot developer, this is the first time I'm trying to get some fix for the open source code back to mainline. If anything wrong during the process, please be gentle :-) Thank you.
Quoted 1 line
From
225c8f8f2af4cf6092260e5c133d90096e2f3352Mon Sep 17 00:00:00 2001
Quoted 8 lines
From: Hua Yanghao <[email protected]>
Date: Mon, 22 Dec 2014 04:32:39 +0800
Subject: [PATCH 1/1] cmd, fdt: fixworking_fdtis set to wrong valueInstead of setting
working_fdttomap_sysmem(addr)(e.g. blob), it should be set to addr directly as insideset_working_fdt_addrit usesmap_sysmem(addr)again. To test: ./u-boot -d dts/dt.bin , then issue: fdt addr0x100, fdt print will then cause an segmentation fault. After this fix fdt print is functional.
Applied to u-boot/master, after fixing the spacing, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150107/31370e6a/attachment.pgp>