)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"f175bbb632419f692b02ed98ed4390d71dab12ff","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"66f6acb1_58bb4490","updated":"2025-06-05 10:26:40.000000000","message":"Thanks for this series.\nI don\u0027t have mandatory comments, just some request for clarification and suggestion for possible future improvements.\nBut I\u0027m not used at working in the flash subsystem, so I will wait for further review before merging this.","commit_id":"b020bf45b823c94b60e2d1ea440a8c1701999805"}],"src/flash/nor/bluenrg-x.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"f175bbb632419f692b02ed98ed4390d71dab12ff","unresolved":true,"context_lines":[{"line_number":146,"context_line":"static int bluenrgx_wait_for_interrupt(struct flash_bank *bank, uint32_t interrupt_flag)"},{"line_number":147,"context_line":"{"},{"line_number":148,"context_line":"\tbool flag_raised \u003d false;"},{"line_number":149,"context_line":"\tfor (unsigned int j \u003d 0; j \u003c 100; j++) {"},{"line_number":150,"context_line":"\t\tuint32_t value;"},{"line_number":151,"context_line":"\t\tif (bluenrgx_read_flash_reg(bank, FLASH_REG_IRQRAW, \u0026value) !\u003d ERROR_OK) {"},{"line_number":152,"context_line":"\t\t\tLOG_ERROR(\"Register read failed\");"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"3d8da341_dc12ea08","line":149,"updated":"2025-06-05 10:26:40.000000000","message":"Using a counted loop for a timeout is risky because it depends on the adapter speed.\nCan you extract from the device spec the max time in seconds or ms?\nIt would be a big improvement changing this to a time loop, maybe in a following patch.","commit_id":"b020bf45b823c94b60e2d1ea440a8c1701999805"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"f175bbb632419f692b02ed98ed4390d71dab12ff","unresolved":true,"context_lines":[{"line_number":400,"context_line":""},{"line_number":401,"context_line":"\twhile (data_count--) {"},{"line_number":402,"context_line":"\t\t/* clear flags */"},{"line_number":403,"context_line":"\t\tif (bluenrgx_write_flash_reg(bank, FLASH_REG_IRQRAW, 0x3f) !\u003d ERROR_OK) {"},{"line_number":404,"context_line":"\t\t\tLOG_ERROR(\"Register write failed\");"},{"line_number":405,"context_line":"\t\t\treturn ERROR_FAIL;"},{"line_number":406,"context_line":"\t\t}"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"45c1deb6_21531cc3","line":403,"updated":"2025-06-05 10:26:40.000000000","message":"What is this magic number 0x3f ?\nI see it is used in other 2 places in this file and 1 place in loader bluenrg-x_write.\nIt could be more clear if you use a macro.\nWhat about creating new patch that only replace this value with a macro?","commit_id":"b020bf45b823c94b60e2d1ea440a8c1701999805"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"f175bbb632419f692b02ed98ed4390d71dab12ff","unresolved":true,"context_lines":[{"line_number":444,"context_line":""},{"line_number":445,"context_line":"\tif ((offset + count) \u003e bank-\u003esize) {"},{"line_number":446,"context_line":"\t\tLOG_ERROR(\"Requested write past beyond of flash size: (offset+count) \u003d %\" PRIu32 \", size\u003d%\" PRIu32,"},{"line_number":447,"context_line":"\t\t\t  (offset + count),"},{"line_number":448,"context_line":"\t\t\t  bank-\u003esize);"},{"line_number":449,"context_line":"\t\treturn ERROR_FLASH_DST_OUT_OF_BANK;"},{"line_number":450,"context_line":"\t}"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"df15eab6_9edd92f8","line":447,"updated":"2025-06-05 10:26:40.000000000","message":"No need for parenthesis.\nWell, not your fault as it was in the original code.\nModify it only if you need to send a new version of this patch.","commit_id":"b020bf45b823c94b60e2d1ea440a8c1701999805"}]}
