)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"081eca89fff774127bdd5edfbeeaba12a9b8f9a9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"a39a078d_cffe58df","updated":"2022-09-21 08:24:45.000000000","message":"Tested rp2040 flash write/erase with valgrind, no leaks detected.","commit_id":"2f7eccd1bb42f3fa7a7c7a81674fd48e7e7db0f1"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"f227df940af387b4dadfe91568d605a015742874","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"2c5be2b5_7e851e96","updated":"2022-09-27 08:38:34.000000000","message":"Gerrit refuses merging this change without any reason...","commit_id":"36cbf136847fc096be6a6cac943653d44465f9cd"}],"src/flash/nor/rp2040.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"ee6bb5070a232d7c56ab5ed7b3fb51f6a31a899b","unresolved":true,"context_lines":[{"line_number":143,"context_line":" * - enters memory-mapped (XIP) mode to make flash data visible"},{"line_number":144,"context_line":" * - deallocates target ROM func stack if previously allocated"},{"line_number":145,"context_line":" */"},{"line_number":146,"context_line":"static int rp2040_finalize_stack_free(struct flash_bank *bank)"},{"line_number":147,"context_line":"{"},{"line_number":148,"context_line":"\tstruct rp2040_flash_bank *priv \u003d bank-\u003edriver_priv;"},{"line_number":149,"context_line":"\tstruct target *target \u003d bank-\u003etarget;"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"62e1d818_9a2040a4","line":146,"updated":"2022-09-21 16:10:43.000000000","message":"this works in pair with rp2040_stack_grab_and_prep().\nShould be renamed rp2040_stack_finalize_and_free() ?","commit_id":"36cbf136847fc096be6a6cac943653d44465f9cd"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"4a67375264fcc9fd5b76942089a495bca15efc77","unresolved":true,"context_lines":[{"line_number":143,"context_line":" * - enters memory-mapped (XIP) mode to make flash data visible"},{"line_number":144,"context_line":" * - deallocates target ROM func stack if previously allocated"},{"line_number":145,"context_line":" */"},{"line_number":146,"context_line":"static int rp2040_finalize_stack_free(struct flash_bank *bank)"},{"line_number":147,"context_line":"{"},{"line_number":148,"context_line":"\tstruct rp2040_flash_bank *priv \u003d bank-\u003edriver_priv;"},{"line_number":149,"context_line":"\tstruct target *target \u003d bank-\u003etarget;"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"d3c3c820_3ce28b4f","line":146,"in_reply_to":"62e1d818_9a2040a4","updated":"2022-09-21 18:06:11.000000000","message":"No.\nThe first function with original name does: stack_grab and then prepares SPI flash\n\nThe second one I named does: finalize flash op by invalidating cache and restore xip mode. After that it does stack_free.","commit_id":"36cbf136847fc096be6a6cac943653d44465f9cd"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"1011a3063f1258850146d037fe4f8e700cd7865b","unresolved":false,"context_lines":[{"line_number":143,"context_line":" * - enters memory-mapped (XIP) mode to make flash data visible"},{"line_number":144,"context_line":" * - deallocates target ROM func stack if previously allocated"},{"line_number":145,"context_line":" */"},{"line_number":146,"context_line":"static int rp2040_finalize_stack_free(struct flash_bank *bank)"},{"line_number":147,"context_line":"{"},{"line_number":148,"context_line":"\tstruct rp2040_flash_bank *priv \u003d bank-\u003edriver_priv;"},{"line_number":149,"context_line":"\tstruct target *target \u003d bank-\u003etarget;"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"8d2b90da_fba4c1a9","line":146,"in_reply_to":"d3c3c820_3ce28b4f","updated":"2022-09-23 22:34:28.000000000","message":"Ack","commit_id":"36cbf136847fc096be6a6cac943653d44465f9cd"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"ee6bb5070a232d7c56ab5ed7b3fb51f6a31a899b","unresolved":true,"context_lines":[{"line_number":253,"context_line":"cleanup:"},{"line_number":254,"context_line":"\ttarget_free_working_area(target, bounce);"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"\trp2040_finalize_stack_free(bank);"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"\treturn err;"},{"line_number":259,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"045bb2bf_acc03657","line":256,"updated":"2022-09-21 16:10:43.000000000","message":"it can return error; let\u0027s propagate it:\n int err2 \u003d rp2040_finalize_stack_free(bank);\n if (err \u003d\u003d ERROR_OK)\n   err \u003d err2;\n\nsame below","commit_id":"36cbf136847fc096be6a6cac943653d44465f9cd"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"4a67375264fcc9fd5b76942089a495bca15efc77","unresolved":true,"context_lines":[{"line_number":253,"context_line":"cleanup:"},{"line_number":254,"context_line":"\ttarget_free_working_area(target, bounce);"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"\trp2040_finalize_stack_free(bank);"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"\treturn err;"},{"line_number":259,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"1f0de2ca_3144b759","line":256,"in_reply_to":"045bb2bf_acc03657","updated":"2022-09-21 18:06:11.000000000","message":"Let\u0027s do not confuse user. \nrp2040_finalize_stack_free() carefully logs all errors.\nThe error return from rp2040_finalize_stack_free() does NOT mean the flash write operation failed. If we propagated the error flash/nor/core.c would show \"error writing to flash...\" after successful write.\nSame for erase and similar for read_id","commit_id":"36cbf136847fc096be6a6cac943653d44465f9cd"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"1011a3063f1258850146d037fe4f8e700cd7865b","unresolved":false,"context_lines":[{"line_number":253,"context_line":"cleanup:"},{"line_number":254,"context_line":"\ttarget_free_working_area(target, bounce);"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"\trp2040_finalize_stack_free(bank);"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"\treturn err;"},{"line_number":259,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"36de0ec9_15baeca9","line":256,"in_reply_to":"1f0de2ca_3144b759","updated":"2022-09-23 22:34:28.000000000","message":"Ack","commit_id":"36cbf136847fc096be6a6cac943653d44465f9cd"}]}
