thor: defer parsing of device string to IO backend
PATCH 1/1 thor: defer parsing of device string to IO backend
This commit adjust thor downloading function to work correctly with deferred device string parsing.
--- common/cmd_thordown.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
common/cmd_thordown.c +3 -3
@@ -26,10 +26,9 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])puts ("TIZEN \"THOR\" Downloader\n" ); - ret =dfu_init_env_entities (interface,simple_strtoul (devstring, -NULL ,10 )); + ret =dfu_init_env_entities (interface, devstring);if (ret) -return ret; + goto done;int controller_index =simple_strtoul (usb_controller,NULL ,0 ); ret =board_usb_init (controller_index,USB_INIT_DEVICE );
@@ -57,6 +56,7 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) exit:g_dnl_unregister (); +done:dfu_free_entities ();return ret;
Signature · 1 line
2.0.0.rc2
PATCH 1/1 thor: defer parsing of device string to IO backend
Quoted 2 lines · Lukasz Majewski
This commit adjust thor downloading function to work correctly with deferred device string parsing.
Oops. I should have grep'd for more users of dfu_init_env_entities() and fixed them up in my commit.
==========
Since this patch also changes behaviour when that function fails, so the partially parsed entries are freed too, I'd re-write the whole commit description as:
Comit XXXXX "dfu: defer parsing of device string to IO backend" changed the function signature of dfu_init_env_entities(). Adjust cmd_thordown.c to match that change.
Also, apply the same change as commit XXXXX "dfu: free entities when parsing fails" to cmd_thordown.c.
==========
But either way,
PATCH v2 1/1 thor: defer parsing of device string to IO backend
In reply to Lukasz MajewskiCommit d4f5ef59cc7 "dfu: defer parsing of device string to IO backend" changed the function signature of dfu_init_env_entities(). Adjust cmd_thordown.c to match that change.
Also, apply the same change as commit d6d37d737b58e "dfu: free entities when parsing fails" to cmd_thordown.c.
--- common/cmd_thordown.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
common/cmd_thordown.c +3 -3
@@ -26,10 +26,9 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])puts ("TIZEN \"THOR\" Downloader\n" ); - ret =dfu_init_env_entities (interface,simple_strtoul (devstring, -NULL ,10 )); + ret =dfu_init_env_entities (interface, devstring);if (ret) -return ret; + goto done;int controller_index =simple_strtoul (usb_controller,NULL ,0 ); ret =board_usb_init (controller_index,USB_INIT_DEVICE );
@@ -57,6 +56,7 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) exit:g_dnl_unregister (); +done:dfu_free_entities ();return ret;
Signature · 1 line
2.0.0.rc2
PATCH v2 1/1 thor: defer parsing of device string to IO backend
Commit d4f5ef59cc7 "dfu: defer parsing of device string to IO backend" changed the function signature of dfu_init_env_entities(). Adjust cmd_thordown.c to match that change.
Also, apply the same change as commit d6d37d737b58e "dfu: free entities when parsing fails" to cmd_thordown.c.
--- common/cmd_thordown.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
common/cmd_thordown.c +3 -3
@@ -26,10 +26,9 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])puts ("TIZEN \"THOR\" Downloader\n" ); - ret =dfu_init_env_entities (interface,simple_strtoul (devstring, -NULL ,10 )); + ret =dfu_init_env_entities (interface, devstring);if (ret) -return ret; + goto done;int controller_index =simple_strtoul (usb_controller,NULL ,0 ); ret =board_usb_init (controller_index,USB_INIT_DEVICE );
@@ -57,6 +56,7 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) exit:g_dnl_unregister (); +done:dfu_free_entities ();return ret;
Signature · 1 line
2.0.0.rc2
PATCH v2 1/1 thor: defer parsing of device string to IO backend
Quoted 10 lines · Lukasz Majewski
Commit
d4f5ef59cc7"dfu: defer parsing of device string to IO backend" changed the function signature ofdfu_init_env_entities(). Adjustcmd_thordown.cto match that change.Also, apply the same change as commit
d6d37d737b58e"dfu: free entities when parsing fails" tocmd_thordown.c.Fixes d4f5ef59cc7 ("dfu: defer parsing of device string to IO backend")Signed-off-by Lukasz Majewski <[email protected]>
Did this go out twice ? What's the V2 changelog please ?
Best regards,
Marek Vasut
PATCH v2 1/1 thor: defer parsing of device string to IO backend
Hi Marek,
Quoted 8 lines · Lukasz Majewski
Quoted 7 lines
Commit
d4f5ef59cc7"dfu: defer parsing of device string to IO backend" changed the function signature ofdfu_init_env_entities(). Adjustcmd_thordown.cto match that change.Also, apply the same change as commit
d6d37d737b58e"dfu: free entities when parsing fails" tocmd_thordown.c.
Quoted 6 lines
Quoted 4 lines
Fixes d4f5ef59cc7 ("dfu: defer parsing of device string to IObackend")
Signed-off-by Lukasz Majewski <[email protected]>Did this go out twice ?
I hope it didn't :-)
Quoted 1 line
What's the V2 changelog please ?
My bad - I wanted to send it ASAP :-)
The v2 was just a complete rewrite of the v1's commit message as it was suggested by Stephen.
No code change was done.
Quoted 3 lines
Best regards,
Marek Vasut
Signature · 5 lines
Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
PATCH v2 1/1 thor: defer parsing of device string to IO backend
In reply to Lukasz MajewskiQuoted 10 lines · Lukasz Majewski
Commit
d4f5ef59cc7"dfu: defer parsing of device string to IO backend" changed the function signature ofdfu_init_env_entities(). Adjustcmd_thordown.cto match that change.Also, apply the same change as commit
d6d37d737b58e"dfu: free entities when parsing fails" tocmd_thordown.c.Fixes d4f5ef59cc7 ("dfu: defer parsing of device string to IO backend")Signed-off-by Lukasz Majewski <[email protected]>
Both the fixes and s-o-b tag should be in the same final paragraph with no blank lines between. I assume that can be easily fixed up when applying.
PATCH v2 1/1 thor: defer parsing of device string to IO backend
Hi Stephen,
Quoted 11 lines · Lukasz Majewski
Quoted 10 lines
Commit
d4f5ef59cc7"dfu: defer parsing of device string to IO backend" changed the function signature ofdfu_init_env_entities(). Adjustcmd_thordown.cto match that change.Also, apply the same change as commit
d6d37d737b58e"dfu: free entities when parsing fails" tocmd_thordown.c.Fixes d4f5ef59cc7 ("dfu: defer parsing of device string to IObackend")
Quoted 7 lines
Quoted 1 line
Signed-off-by Lukasz Majewski <[email protected]>Both the fixes and s-o-b tag should be in the same final paragraph with no blank lines between. I assume that can be easily fixed up when applying.
Reviewed-by Stephen Warren <[email protected]>
Applied to u-boot-dfu,
Signature · 5 lines
Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group