)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"c282be1d1e5fe4a25b408fe9bc87b4b69ad2935b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"6ef54ec6_e70c3e91","updated":"2023-07-02 22:46:47.000000000","message":"Not tested, since I don\u0027t own any of the adapters impacted by this change.","commit_id":"7a710953db734cc282ecf90b542c7ebb3a4dbafa"},{"author":{"_account_id":1002151,"name":"ahmed BOUDJELIDA","display_name":"Ahmed BOUDJELIDA","email":"aboudjelida@nanoxplore.com","username":"aboudjelida"},"change_message_id":"e8e30901d85767cd9b8e3f5515d9a17a8023fab8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"b86de894_b8d7cbd8","updated":"2023-07-11 09:12:34.000000000","message":"After using it with my ANGIE driver patch, it works fine.","commit_id":"73556c2e8812d780d0aed61e4f5dfff5f0324923"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"1dd6365106013f828d0230c81fbaec4977724158","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"b723f68e_fde5056b","updated":"2023-07-12 08:15:46.000000000","message":"TBH I\u0027m not a fan of these no-added-value helpers (I mean not only jtag_libusb_control_transfer(), mainly jtag_libusb_bulk_read/write).\n\nThere are use cases when error message is not desired or we need to decide by the returned error code.\nAlmost half of drivers uses libusb_bulk_transfer() directly, some uses also libusb_control_transfer() instead of jtag_ version.\n\nThe changed jtag_libusb_control_transfer() is overcomplicated in comparison\nto libusb_control_transfer(). Why to force developers to study header of yet-another-version of libusb_control_transfer?\n\nAnd last but not least the misleading name - it is used for all adapters, not only jtag ones.\n\nWould not be better to drop the rubbish?","commit_id":"73556c2e8812d780d0aed61e4f5dfff5f0324923"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"9038b16f959177ef332aecaf2a9721cb9bf60cbc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"2c457055_ee758b90","updated":"2023-07-11 20:48:17.000000000","message":"Thanks for the test","commit_id":"73556c2e8812d780d0aed61e4f5dfff5f0324923"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"c8f37aa265813add5984f567104d1056bc47a4c2","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"000b34a1_7f586ca6","in_reply_to":"b723f68e_fde5056b","updated":"2023-07-12 23:06:51.000000000","message":"Not a big fan either, but I would like to take more time to think over:\n\n- I have been fighting with the incorrect handling of jimtcl return value JIM_xxx mixed with OpenOCD values ERROR_xxx. While I have not finished yet, I plan to complete it with some helper around the jimtcl functions.\nThere is a similar issue with libusb return values incompletely checked or mixed with OpenOCD ones. If an evolution of these helpers can help, I would like to keep them in consideration.\n\n- Fully agree on the undesired error messages. I would like to propose a fix for that.\n\n- I\u0027m working with a FPGA emulation platform that is super slow. The synchronous libusb_bulk_read/write (with or without the helper) causes an annoying GDB timeout message. I plan to convert the helpers jtag_libusb_bulk_read/write in wrappers around the more complex asynchronous API libusb transfer with callback; while waiting for completion, the wrapper should send keep-alive to GDB. The helper would prevent modifying the driver\u0027s code.\n\nYes, the jtag prefix is misleading and incorrect, not only here but in many other places. And even the folder name src/jtag/ is incorrect. Both are here for historical reasons.\nAs a general coding style rule I would suggest to start a replacement. The prefix could become \"openocd\" or shorted \"oocd\" or whatever makes more sense in the specific context (target, adapter, transport, ...).\nFor the folder name I suggest renaming it as \"src/adapter\" for all the driver\u0027s code, while moving in \"src/transport\" the code for jtag, swd and swim.\nBut this can be a long journey.\n\nIf you agree, I would continue with this patch that slightly modifies the code that already use the helper (without touching the code that use libusb directly) and return later on this discussion.","commit_id":"73556c2e8812d780d0aed61e4f5dfff5f0324923"},{"author":{"_account_id":1002151,"name":"ahmed BOUDJELIDA","display_name":"Ahmed BOUDJELIDA","email":"aboudjelida@nanoxplore.com","username":"aboudjelida"},"change_message_id":"8d9df7cc8c43ac55986cf7627ba2998351057b3a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"eac87559_a8569210","updated":"2023-07-24 12:30:18.000000000","message":"It works fine with my driver commit.","commit_id":"396fe00810bae84caea490e1106e244174aaad38"}],"src/jtag/drivers/kitprog.c":[{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"1dd6365106013f828d0230c81fbaec4977724158","unresolved":true,"context_lines":[{"line_number":421,"context_line":"\t\tprotocol, \u0026status, 1, 0);"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"\tif (transferred \u003d\u003d 0) {"},{"line_number":424,"context_line":"\t\tLOG_DEBUG(\"Zero bytes transferred\");"},{"line_number":425,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":426,"context_line":"\t}"},{"line_number":427,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"a14edb2c_ce74eaf8","side":"PARENT","line":424,"range":{"start_line":424,"start_character":2,"end_line":424,"end_character":38},"updated":"2023-07-12 08:15:46.000000000","message":"The original message is misleading and if zero sized transfer really could happen, ERROR_FAIL is returned with debug message only.","commit_id":"82279288842ca67e0643b257e416f22638c4c4fd"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"c8f37aa265813add5984f567104d1056bc47a4c2","unresolved":true,"context_lines":[{"line_number":421,"context_line":"\t\tprotocol, \u0026status, 1, 0);"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"\tif (transferred \u003d\u003d 0) {"},{"line_number":424,"context_line":"\t\tLOG_DEBUG(\"Zero bytes transferred\");"},{"line_number":425,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":426,"context_line":"\t}"},{"line_number":427,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"d7cfa40b_2537c5bf","side":"PARENT","line":424,"range":{"start_line":424,"start_character":2,"end_line":424,"end_character":38},"in_reply_to":"a14edb2c_ce74eaf8","updated":"2023-07-12 23:06:51.000000000","message":"This driver always uses LOG_DEBUG() before returning error. It\u0027s a general \"style\", not only in this line.","commit_id":"82279288842ca67e0643b257e416f22638c4c4fd"}]}
