)]}'
{"src/helper/list.h":[{"author":{"_account_id":1000005,"name":"Andreas Fritiofson","email":"andreas.fritiofson@gmail.com","username":"Nattgris"},"change_message_id":"43c08da9dc44b8a74489c8d56fd74203e76176e8","unresolved":false,"context_lines":[{"line_number":457,"context_line":" * Prepares a pos entry for use as a start point in list_for_each_entry_continue()."},{"line_number":458,"context_line":" */"},{"line_number":459,"context_line":"#define list_prepare_entry(pos, head, member) \\"},{"line_number":460,"context_line":"\t((pos) ? pos : list_entry(head, typeof(*pos), member))"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"/**"},{"line_number":463,"context_line":" * list_for_each_entry_continue - continue iteration over list of given type"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"aedf27f1_2486a819","line":460,"updated":"2021-05-23 11:47:27.000000000","message":"Beware!\n\nThe macro may use the ?: construct specifically to avoid multiple evaluation of the pos argument and this changes it. Leave this macro alone, which isn\u0027t a problem since it\u0027s not used in OpenOCD anyway.","commit_id":"7a01c23189943fb0f0d62e49b98f82b9928f57f2"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"acfbf70365bf8767c47c453a2a9a178bdbc65295","unresolved":false,"context_lines":[{"line_number":457,"context_line":" * Prepares a pos entry for use as a start point in list_for_each_entry_continue()."},{"line_number":458,"context_line":" */"},{"line_number":459,"context_line":"#define list_prepare_entry(pos, head, member) \\"},{"line_number":460,"context_line":"\t((pos) ? pos : list_entry(head, typeof(*pos), member))"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"/**"},{"line_number":463,"context_line":" * list_for_each_entry_continue - continue iteration over list of given type"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"aedf27f1_6416f0ae","line":460,"in_reply_to":"aedf27f1_044044a7","updated":"2021-05-24 17:01:08.000000000","message":"Sorry if was not clear. For me today there is no problem applying this fix because the macro is not used. Also agree that other macros in this file are not safe for multiple evaluation of the arguments, so should be ok.\nI never considered this GCC extension as an issue, since supported by clang too. But we don\u0027t specify it in the coding style, so let\u0027s fix it here.\n\nThe only mention of Linux heritage is in the initial commit message http://openocd.zylin.com/450/\nThen, using it in kernel I can easily detect it.\nYes, Linux origin should be mentioned in a comment on top.","commit_id":"7a01c23189943fb0f0d62e49b98f82b9928f57f2"},{"author":{"_account_id":1000438,"name":"R. Diez","email":"rdiez-2006@rd10.de","username":"rdiez"},"change_message_id":"4e6d94e5784bcc2c490cddf452d6055c72650b5c","unresolved":false,"context_lines":[{"line_number":457,"context_line":" * Prepares a pos entry for use as a start point in list_for_each_entry_continue()."},{"line_number":458,"context_line":" */"},{"line_number":459,"context_line":"#define list_prepare_entry(pos, head, member) \\"},{"line_number":460,"context_line":"\t((pos) ? pos : list_entry(head, typeof(*pos), member))"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"/**"},{"line_number":463,"context_line":" * list_for_each_entry_continue - continue iteration over list of given type"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"aedf27f1_e47f4010","line":460,"in_reply_to":"aedf27f1_2486a819","updated":"2021-05-23 14:16:46.000000000","message":"I do not think that this is a valid argument in this occasion:\n\n1) If we want to stop using a non-standard GCC extension, we do not really want to leave one of them behind. If someone starts using this macro, OpenOCD would start using the non-standard extension again. That is, we would not really be fixing this properly.\n\n2) This file is full of macros that evaluate pos several times. It seems like this kind of argument is designed to be the name of a pointer variable. If you start passing expressions with side-effects, a lot more is going to start breaking.\n\nIn fact, the documentation for list_prepare_entry() states that it is to be used before list_for_each_entry_continue(), which in turn evaluates pos twice.","commit_id":"7a01c23189943fb0f0d62e49b98f82b9928f57f2"},{"author":{"_account_id":1000438,"name":"R. Diez","email":"rdiez-2006@rd10.de","username":"rdiez"},"change_message_id":"0f3ca538ba8f351de02225bad8063f45523ac1bd","unresolved":false,"context_lines":[{"line_number":457,"context_line":" * Prepares a pos entry for use as a start point in list_for_each_entry_continue()."},{"line_number":458,"context_line":" */"},{"line_number":459,"context_line":"#define list_prepare_entry(pos, head, member) \\"},{"line_number":460,"context_line":"\t((pos) ? pos : list_entry(head, typeof(*pos), member))"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"/**"},{"line_number":463,"context_line":" * list_for_each_entry_continue - continue iteration over list of given type"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"aedf27f1_f80e0037","line":460,"in_reply_to":"aedf27f1_38056814","updated":"2021-05-26 13:26:15.000000000","message":"If you are updating the file from \"upstream\":\n1) Please take the opportunity to add a comment at the top stating where the file comes from. Otherwise, the next developer may assume it is an OpenOCD-specific file and not think about looking at the commit history. Not everyone knows the Linux Kernel implementation.\n2) I\u0027ll drop or redo this patch accordingly afterwards.","commit_id":"7a01c23189943fb0f0d62e49b98f82b9928f57f2"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6476a75bcd33bcbdbcaac29791807255edb23071","unresolved":false,"context_lines":[{"line_number":457,"context_line":" * Prepares a pos entry for use as a start point in list_for_each_entry_continue()."},{"line_number":458,"context_line":" */"},{"line_number":459,"context_line":"#define list_prepare_entry(pos, head, member) \\"},{"line_number":460,"context_line":"\t((pos) ? pos : list_entry(head, typeof(*pos), member))"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"/**"},{"line_number":463,"context_line":" * list_for_each_entry_continue - continue iteration over list of given type"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"aedf27f1_38056814","line":460,"in_reply_to":"aedf27f1_6416f0ae","updated":"2021-05-26 13:16:14.000000000","message":"I\u0027m updating list.h from latest kernel. This will bring in OpenOCD also the new comments and function/macro descriptions.\nThe original code has still \"? :\" here. I will update it as in this patch.\nBut here I think there is another problem, and the added \"pos\" should be within parenthesis as \"(pos)\".\nPlease either fix it here, or drop this file and I will take this change in my version.","commit_id":"7a01c23189943fb0f0d62e49b98f82b9928f57f2"},{"author":{"_account_id":1000438,"name":"R. Diez","email":"rdiez-2006@rd10.de","username":"rdiez"},"change_message_id":"47b361c1cab3969a09bfeeeb9672c83dbf6b3985","unresolved":false,"context_lines":[{"line_number":457,"context_line":" * Prepares a pos entry for use as a start point in list_for_each_entry_continue()."},{"line_number":458,"context_line":" */"},{"line_number":459,"context_line":"#define list_prepare_entry(pos, head, member) \\"},{"line_number":460,"context_line":"\t((pos) ? pos : list_entry(head, typeof(*pos), member))"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"/**"},{"line_number":463,"context_line":" * list_for_each_entry_continue - continue iteration over list of given type"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"aedf27f1_044044a7","line":460,"in_reply_to":"aedf27f1_642fd0f4","updated":"2021-05-24 14:33:47.000000000","message":"I am not sure how to interpret your comment. Would you rather remove the usage of the non-standard extension from this macro, or not?\nI did not know that this file came from the Linux kernel. Should we not mention its heritage in the comments at the top? Perhaps we want to update it from \u0027upstream\u0027 at some point in time, in case there are fixes or improvements.","commit_id":"7a01c23189943fb0f0d62e49b98f82b9928f57f2"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"4d5525939289f2cc829cdb9070fe6feedf5dd6ac","unresolved":false,"context_lines":[{"line_number":457,"context_line":" * Prepares a pos entry for use as a start point in list_for_each_entry_continue()."},{"line_number":458,"context_line":" */"},{"line_number":459,"context_line":"#define list_prepare_entry(pos, head, member) \\"},{"line_number":460,"context_line":"\t((pos) ? pos : list_entry(head, typeof(*pos), member))"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"/**"},{"line_number":463,"context_line":" * list_for_each_entry_continue - continue iteration over list of given type"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"aedf27f1_642fd0f4","line":460,"in_reply_to":"aedf27f1_e47f4010","updated":"2021-05-24 14:11:58.000000000","message":"This macro is taken by Linux kernel that uses GNU extension everywhere.\nThere should be no problem, here. The macro is not used in openocd yet.","commit_id":"7a01c23189943fb0f0d62e49b98f82b9928f57f2"}]}
