[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for list: Prevent compiler reloads inside 'safe' list iteration

Patchwork patchwork at emeril.freedesktop.org
Tue Mar 10 19:57:59 UTC 2020


== Series Details ==

Series: list: Prevent compiler reloads inside 'safe' list iteration
URL   : https://patchwork.freedesktop.org/series/74495/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
d40a755ea0b3 list: Prevent compiler reloads inside 'safe' list iteration
-:37: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'pos' - possible side-effects?
#37: FILE: include/linux/list.h:547:
+#define list_next_entry_safe(pos, member) \
+	list_entry(READ_ONCE((pos)->member.next), typeof(*(pos)), member)

-:37: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'member' - possible side-effects?
#37: FILE: include/linux/list.h:547:
+#define list_next_entry_safe(pos, member) \
+	list_entry(READ_ONCE((pos)->member.next), typeof(*(pos)), member)

-:37: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'member' may be better as '(member)' to avoid precedence issues
#37: FILE: include/linux/list.h:547:
+#define list_next_entry_safe(pos, member) \
+	list_entry(READ_ONCE((pos)->member.next), typeof(*(pos)), member)

-:55: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'pos' - possible side-effects?
#55: FILE: include/linux/list.h:566:
+#define list_prev_entry_safe(pos, member) \
+	list_entry(READ_ONCE((pos)->member.prev), typeof(*(pos)), member)

-:55: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'member' - possible side-effects?
#55: FILE: include/linux/list.h:566:
+#define list_prev_entry_safe(pos, member) \
+	list_entry(READ_ONCE((pos)->member.prev), typeof(*(pos)), member)

-:55: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'member' may be better as '(member)' to avoid precedence issues
#55: FILE: include/linux/list.h:566:
+#define list_prev_entry_safe(pos, member) \
+	list_entry(READ_ONCE((pos)->member.prev), typeof(*(pos)), member)

-:82: WARNING:SPACE_BEFORE_TAB: please, no space before tabs
#82: FILE: include/linux/list.h:725:
+#define list_for_each_entry_safe_continue(pos, n, head, member) ^I\$

-:82: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'pos' - possible side-effects?
#82: FILE: include/linux/list.h:725:
+#define list_for_each_entry_safe_continue(pos, n, head, member) 	\
+	for (pos = list_next_entry(pos, member), 			\
+		n = list_next_entry_safe(pos, member);			\
+	     &pos->member != (head);					\
+	     pos = n, n = list_next_entry_safe(n, member))

-:82: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'n' - possible side-effects?
#82: FILE: include/linux/list.h:725:
+#define list_for_each_entry_safe_continue(pos, n, head, member) 	\
+	for (pos = list_next_entry(pos, member), 			\
+		n = list_next_entry_safe(pos, member);			\
+	     &pos->member != (head);					\
+	     pos = n, n = list_next_entry_safe(n, member))

-:82: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'member' - possible side-effects?
#82: FILE: include/linux/list.h:725:
+#define list_for_each_entry_safe_continue(pos, n, head, member) 	\
+	for (pos = list_next_entry(pos, member), 			\
+		n = list_next_entry_safe(pos, member);			\
+	     &pos->member != (head);					\
+	     pos = n, n = list_next_entry_safe(n, member))

-:83: WARNING:SPACE_BEFORE_TAB: please, no space before tabs
#83: FILE: include/linux/list.h:726:
+^Ifor (pos = list_next_entry(pos, member), ^I^I^I\$

-:98: WARNING:SPACE_BEFORE_TAB: please, no space before tabs
#98: FILE: include/linux/list.h:741:
+#define list_for_each_entry_safe_from(pos, n, head, member) ^I^I\$

-:98: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'pos' - possible side-effects?
#98: FILE: include/linux/list.h:741:
+#define list_for_each_entry_safe_from(pos, n, head, member) 		\
+	for (n = list_next_entry_safe(pos, member);			\
+	     &pos->member != (head);					\
+	     pos = n, n = list_next_entry_safe(n, member))

-:98: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'n' - possible side-effects?
#98: FILE: include/linux/list.h:741:
+#define list_for_each_entry_safe_from(pos, n, head, member) 		\
+	for (n = list_next_entry_safe(pos, member);			\
+	     &pos->member != (head);					\
+	     pos = n, n = list_next_entry_safe(n, member))

-:98: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'member' - possible side-effects?
#98: FILE: include/linux/list.h:741:
+#define list_for_each_entry_safe_from(pos, n, head, member) 		\
+	for (n = list_next_entry_safe(pos, member);			\
+	     &pos->member != (head);					\
+	     pos = n, n = list_next_entry_safe(n, member))

total: 0 errors, 3 warnings, 12 checks, 94 lines checked



More information about the Intel-gfx mailing list