)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"8b34721b911f67e1407417bec6fc84154cb3d60e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"1fff7380_3b7ea158","updated":"2026-02-12 19:53:40.000000000","message":"Marc, the original code was yours. Please review the update. Thanks","commit_id":"c42e5ae5daf36d9c2211f627b8529974cf3b133c"},{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"bf2ade3eced53ce9838229fe44e620f2f13bffc1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"2025f2ce_2f23a45c","updated":"2026-02-16 09:19:35.000000000","message":"Wow, I had completely forgotten that I had contributed anything to this code.\n\nTested on STM32L5 and works as expected and described in the commit message. No regression found on other devices. Thanks!","commit_id":"c42e5ae5daf36d9c2211f627b8529974cf3b133c"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"ea8647f9b65f5cede510bb65523e68addaa39ee8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"1344ba0e_59da3484","in_reply_to":"2025f2ce_2f23a45c","updated":"2026-02-16 10:03:32.000000000","message":"Thanks for testing!","commit_id":"c42e5ae5daf36d9c2211f627b8529974cf3b133c"}],"src/target/arm_adi_v5.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"93c8536bdac4819a871e56ba1c5398fb1c83a6be","unresolved":true,"context_lines":[{"line_number":1169,"context_line":"\t\t\tfree(types_str);"},{"line_number":1170,"context_line":"\t\t\ttypes_str \u003d next_str;"},{"line_number":1171,"context_line":"\t\t}"},{"line_number":1172,"context_line":"\t}"},{"line_number":1173,"context_line":"\tif (types_str)"},{"line_number":1174,"context_line":"\t\tLOG_DEBUG(\"No %s found\", types_str);"},{"line_number":1175,"context_line":"\tfree(types_str);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"6e93e9b3_0f9f61fc","line":1172,"updated":"2026-02-04 16:11:36.000000000","message":"We get no message on allocation failure.\nPlease add, at the end of each iteration\n```\nif (!types_str) {\n    LOG_ERROR(\"Out of memory\");\n    return ERROR_FAIL;\n}\n```\nthen the loop exit with `types_str !\u003d NULL`, so the test below can be dropped","commit_id":"81cb2fd3e1f0751ab42461a4accb9c3180a9851b"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"60b3841e227e62e6b29e18c7961b57a7e7e0bb07","unresolved":true,"context_lines":[{"line_number":1169,"context_line":"\t\t\tfree(types_str);"},{"line_number":1170,"context_line":"\t\t\ttypes_str \u003d next_str;"},{"line_number":1171,"context_line":"\t\t}"},{"line_number":1172,"context_line":"\t}"},{"line_number":1173,"context_line":"\tif (types_str)"},{"line_number":1174,"context_line":"\t\tLOG_DEBUG(\"No %s found\", types_str);"},{"line_number":1175,"context_line":"\tfree(types_str);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"db5afc7f_4a147697","line":1172,"in_reply_to":"6e93e9b3_0f9f61fc","updated":"2026-02-04 17:54:03.000000000","message":"The whole loop just concatenates the text just for `LOG_DEBUG()` and my code\nsimple drops `LOG_DEBUG()` in case of malloc error and ERROR_FAIL is returned anyway.\n\nAnd you request `LOG_ERROR(\"Out of memory\")` which uses `alloc_printf()` with probably longer string - so `LOG_ERROR()` most probably logs nothing and the returned code is same.\nLittle bit ridiculous, isn\u0027t it?","commit_id":"81cb2fd3e1f0751ab42461a4accb9c3180a9851b"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"b44a97fe5c6eb1bb90b20943f815dbec1f1e8d92","unresolved":false,"context_lines":[{"line_number":1169,"context_line":"\t\t\tfree(types_str);"},{"line_number":1170,"context_line":"\t\t\ttypes_str \u003d next_str;"},{"line_number":1171,"context_line":"\t\t}"},{"line_number":1172,"context_line":"\t}"},{"line_number":1173,"context_line":"\tif (types_str)"},{"line_number":1174,"context_line":"\t\tLOG_DEBUG(\"No %s found\", types_str);"},{"line_number":1175,"context_line":"\tfree(types_str);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"82b00ae0_5ca196a3","line":1172,"in_reply_to":"ae3124b4_58692132","updated":"2026-02-21 17:58:46.000000000","message":"I\u0027m also not at all sure that a `LOG_ERROR()` will work in case of out of memory error. Maybe some special path in the logger\u0027s code should be implemented to be sure it works.\nBut at least let\u0027s keep consistency on the allocation errors, otherwise we will never sort them out.","commit_id":"81cb2fd3e1f0751ab42461a4accb9c3180a9851b"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"9e1f5c11d94d493e5b026f8cfa4ab6d7384626ad","unresolved":false,"context_lines":[{"line_number":1169,"context_line":"\t\t\tfree(types_str);"},{"line_number":1170,"context_line":"\t\t\ttypes_str \u003d next_str;"},{"line_number":1171,"context_line":"\t\t}"},{"line_number":1172,"context_line":"\t}"},{"line_number":1173,"context_line":"\tif (types_str)"},{"line_number":1174,"context_line":"\t\tLOG_DEBUG(\"No %s found\", types_str);"},{"line_number":1175,"context_line":"\tfree(types_str);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"ae3124b4_58692132","line":1172,"in_reply_to":"db5afc7f_4a147697","updated":"2026-02-04 19:50:42.000000000","message":"Done","commit_id":"81cb2fd3e1f0751ab42461a4accb9c3180a9851b"},{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"bf2ade3eced53ce9838229fe44e620f2f13bffc1","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"\t\tdap_put_ap(ap);"},{"line_number":1160,"context_line":"\t}"},{"line_number":1161,"context_line":""},{"line_number":1162,"context_line":"\tchar *types_str \u003d NULL;"},{"line_number":1163,"context_line":"\tfor (unsigned int i \u003d 0; i \u003c num_types; i++) {"},{"line_number":1164,"context_line":"\t\tif (!types_str) {"},{"line_number":1165,"context_line":"\t\t\ttypes_str \u003d strdup(ap_type_to_description(types_to_find[i]));"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"0edeb1bb_49947443","line":1162,"updated":"2026-02-16 09:19:35.000000000","message":"Quite bulky code for a debug message, but that\u0027s C :D","commit_id":"c42e5ae5daf36d9c2211f627b8529974cf3b133c"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"ea8647f9b65f5cede510bb65523e68addaa39ee8","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"\t\tdap_put_ap(ap);"},{"line_number":1160,"context_line":"\t}"},{"line_number":1161,"context_line":""},{"line_number":1162,"context_line":"\tchar *types_str \u003d NULL;"},{"line_number":1163,"context_line":"\tfor (unsigned int i \u003d 0; i \u003c num_types; i++) {"},{"line_number":1164,"context_line":"\t\tif (!types_str) {"},{"line_number":1165,"context_line":"\t\t\ttypes_str \u003d strdup(ap_type_to_description(types_to_find[i]));"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"43124887_1c0bd76b","line":1162,"in_reply_to":"0edeb1bb_49947443","updated":"2026-02-16 10:03:32.000000000","message":"Yup, that\u0027s it. I considered printing the first and optionally the second name, because we don\u0027t use more than two, but the code was almost same.","commit_id":"c42e5ae5daf36d9c2211f627b8529974cf3b133c"}],"src/target/arm_adi_v5.h":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"93c8536bdac4819a871e56ba1c5398fb1c83a6be","unresolved":true,"context_lines":[{"line_number":751,"context_line":"\t\t\tstruct adiv5_ap **ap_out)"},{"line_number":752,"context_line":"{"},{"line_number":753,"context_line":"\tconst enum ap_type types[1] \u003d { type_to_find };"},{"line_number":754,"context_line":"\treturn dap_find_by_types_get_ap(dap, types, 1, ap_out);"},{"line_number":755,"context_line":"}"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"/* Return AP with specified ap_num. Increment AP refcount */"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"575124ec_d232f3d4","line":754,"updated":"2026-02-04 16:11:36.000000000","message":"Just for style and to avoid magic numbers, drop `1` in the declaration and in the function call:\n```\nconst enum ap_type types[] \u003d { type_to_find };\nreturn dap_find_by_types_get_ap(dap, types, ARRAY_SIZE(types), ap_out);\n```","commit_id":"81cb2fd3e1f0751ab42461a4accb9c3180a9851b"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"60b3841e227e62e6b29e18c7961b57a7e7e0bb07","unresolved":true,"context_lines":[{"line_number":751,"context_line":"\t\t\tstruct adiv5_ap **ap_out)"},{"line_number":752,"context_line":"{"},{"line_number":753,"context_line":"\tconst enum ap_type types[1] \u003d { type_to_find };"},{"line_number":754,"context_line":"\treturn dap_find_by_types_get_ap(dap, types, 1, ap_out);"},{"line_number":755,"context_line":"}"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"/* Return AP with specified ap_num. Increment AP refcount */"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"66954664_6ebee4df","line":754,"in_reply_to":"575124ec_d232f3d4","updated":"2026-02-04 17:54:03.000000000","message":"Oh dear, be sure that I considered `ARRAY_SIZE()` in this code and said\nto myself that it\u0027s hell complicated for this two line code and IMO the simpler\nis better here. Also note that there will be exactly **ONE** type forever by principle and the array never gets extended. That\u0027s why I prefer `types[1]` on the first line.","commit_id":"81cb2fd3e1f0751ab42461a4accb9c3180a9851b"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"ea8647f9b65f5cede510bb65523e68addaa39ee8","unresolved":false,"context_lines":[{"line_number":751,"context_line":"\t\t\tstruct adiv5_ap **ap_out)"},{"line_number":752,"context_line":"{"},{"line_number":753,"context_line":"\tconst enum ap_type types[1] \u003d { type_to_find };"},{"line_number":754,"context_line":"\treturn dap_find_by_types_get_ap(dap, types, 1, ap_out);"},{"line_number":755,"context_line":"}"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"/* Return AP with specified ap_num. Increment AP refcount */"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"8445f29d_12fc965e","line":754,"in_reply_to":"66954664_6ebee4df","updated":"2026-02-16 10:03:32.000000000","message":"Kept as is...","commit_id":"81cb2fd3e1f0751ab42461a4accb9c3180a9851b"}]}
