)]}'
{"src/jtag/drivers/am335xgpio.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"2bcbb63ab061291e4d96ffc61d5925e6d176bf53","unresolved":true,"context_lines":[{"line_number":278,"context_line":"static int am335xgpio_blink(bool on)"},{"line_number":279,"context_line":"{"},{"line_number":280,"context_line":"\tif (is_gpio_config_valid(\u0026adapter_gpio_config[ADAPTER_GPIO_IDX_LED]))"},{"line_number":281,"context_line":"\t\tset_gpio_value(\u0026adapter_gpio_config[ADAPTER_GPIO_IDX_LED], on);"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"\treturn ERROR_OK;"},{"line_number":284,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"271e5f39_d3b3d45e","line":281,"updated":"2024-09-30 07:20:48.000000000","message":"Same comment as for bcm2835gpio.c","commit_id":"ac6c321a2152bf46bc4751395ee49216d9b870ef"}],"src/jtag/drivers/bcm2835gpio.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"2bcbb63ab061291e4d96ffc61d5925e6d176bf53","unresolved":true,"context_lines":[{"line_number":411,"context_line":"static int bcm2835gpio_blink(bool on)"},{"line_number":412,"context_line":"{"},{"line_number":413,"context_line":"\tif (is_gpio_config_valid(ADAPTER_GPIO_IDX_LED))"},{"line_number":414,"context_line":"\t\tset_gpio_value(\u0026adapter_gpio_config[ADAPTER_GPIO_IDX_LED], on);"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"\treturn ERROR_OK;"},{"line_number":417,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"00ccf985_344e828d","line":414,"updated":"2024-09-30 07:20:48.000000000","message":"`set_gpio_value()` requires a `int`, not a `bool`.\nWhile it would be nice to change the function too in a following patch, in mean time please write here:\n`on ? 1 : 0`","commit_id":"ac6c321a2152bf46bc4751395ee49216d9b870ef"},{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"e6b1a8c4d5e63a203c30f3e4ecacbf3926fdf381","unresolved":true,"context_lines":[{"line_number":411,"context_line":"static int bcm2835gpio_blink(bool on)"},{"line_number":412,"context_line":"{"},{"line_number":413,"context_line":"\tif (is_gpio_config_valid(ADAPTER_GPIO_IDX_LED))"},{"line_number":414,"context_line":"\t\tset_gpio_value(\u0026adapter_gpio_config[ADAPTER_GPIO_IDX_LED], on);"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"\treturn ERROR_OK;"},{"line_number":417,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"a85f5cd9_b03e732d","line":414,"in_reply_to":"00ccf985_344e828d","updated":"2024-09-30 19:54:48.000000000","message":"Yes, we should fix this in a following patch. However, why would like to add this, what is the big advantage? A bool is implicitly 1/0 for true/false according to the C99 specification.","commit_id":"ac6c321a2152bf46bc4751395ee49216d9b870ef"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"75751b91c2cda31e2013c9aac6470cd5e54c9eb3","unresolved":true,"context_lines":[{"line_number":411,"context_line":"static int bcm2835gpio_blink(bool on)"},{"line_number":412,"context_line":"{"},{"line_number":413,"context_line":"\tif (is_gpio_config_valid(ADAPTER_GPIO_IDX_LED))"},{"line_number":414,"context_line":"\t\tset_gpio_value(\u0026adapter_gpio_config[ADAPTER_GPIO_IDX_LED], on);"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"\treturn ERROR_OK;"},{"line_number":417,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"51e24564_1f8f9ec2","line":414,"in_reply_to":"a85f5cd9_b03e732d","updated":"2024-10-13 16:25:18.000000000","message":"Yes, `bool` is an implicit 1/0.\nThe idea here is to decouple the mix of `bool` and `int` that affects the overall code. Several of your patches so far has been aligned with this idea.\nIn other part of OpenOCD we have already this `? 1 : 0` in place, and I think this helps highlighting where a `bool` is explicitly converted to `int` to comply with the function prototype.\nAnyway, I\u0027m not going to strongly push for this, hoping that `set_gpio_value()` could soon adapt its prototype.","commit_id":"ac6c321a2152bf46bc4751395ee49216d9b870ef"}],"src/jtag/drivers/linuxgpiod.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"2bcbb63ab061291e4d96ffc61d5925e6d176bf53","unresolved":true,"context_lines":[{"line_number":185,"context_line":"\tif (!is_gpio_config_valid(ADAPTER_GPIO_IDX_LED))"},{"line_number":186,"context_line":"\t\treturn ERROR_OK;"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"\tretval \u003d gpiod_line_set_value(gpiod_line[ADAPTER_GPIO_IDX_LED], on);"},{"line_number":189,"context_line":"\tif (retval \u003c 0)"},{"line_number":190,"context_line":"\t\tLOG_WARNING(\"Fail set led\");"},{"line_number":191,"context_line":"\treturn retval;"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"615ed07e_a510613d","line":188,"updated":"2024-09-30 07:20:48.000000000","message":"Here we are still using the obsoleted API libgpiod 1.0.\nThis call requires `int`, not `bool`.\nPlease use `on ? 1 : 0`","commit_id":"ac6c321a2152bf46bc4751395ee49216d9b870ef"}]}
