✗ Fi.CI.CHECKPATCH: warning for drm/i915: Protect PIPE_CONF_CHECK macros with do {} while(0)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



== Series Details ==

Series: drm/i915: Protect PIPE_CONF_CHECK macros with do {} while(0)
URL   : https://patchwork.freedesktop.org/series/40118/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
f40fddd1cd8c drm/i915: Protect PIPE_CONF_CHECK macros with do {} while(0)
-:24: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#24: FILE: drivers/gpu/drm/i915/intel_display.c:11090:
+#define PIPE_CONF_CHECK_X(name) do { \
 	if (current_config->name != pipe_config->name) { \
 		pipe_config_err(adjust, __stringify(name), \
 			  "(expected 0x%08x, found 0x%08x)\n", \
 			  current_config->name, \
 			  pipe_config->name); \
 		ret = false; \
+	} \
+} while (0)

-:36: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#36: FILE: drivers/gpu/drm/i915/intel_display.c:11100:
+#define PIPE_CONF_CHECK_I(name) do { \
 	if (current_config->name != pipe_config->name) { \
 		pipe_config_err(adjust, __stringify(name), \
 			  "(expected %i, found %i)\n", \
 			  current_config->name, \
 			  pipe_config->name); \
 		ret = false; \
+	} \
+} while (0)

-:48: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#48: FILE: drivers/gpu/drm/i915/intel_display.c:11110:
+#define PIPE_CONF_CHECK_BOOL(name) do { \
 	if (current_config->name != pipe_config->name) { \
 		pipe_config_err(adjust, __stringify(name), \
 			  "(expected %s, found %s)\n", \
 			  yesno(current_config->name), \
 			  yesno(pipe_config->name)); \
 		ret = false; \
+	} \
+} while (0)

-:65: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#65: FILE: drivers/gpu/drm/i915/intel_display.c:11125:
+#define PIPE_CONF_CHECK_BOOL_INCOMPLETE(name) do { \
 	if (!fixup_inherited || (!current_config->name && !pipe_config->name)) { \
 		PIPE_CONF_CHECK_BOOL(name); \
 	} else { \

-:78: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#78: FILE: drivers/gpu/drm/i915/intel_display.c:11137:
+#define PIPE_CONF_CHECK_P(name) do { \
 	if (current_config->name != pipe_config->name) { \
 		pipe_config_err(adjust, __stringify(name), \
 			  "(expected %p, found %p)\n", \
 			  current_config->name, \
 			  pipe_config->name); \
 		ret = false; \
+	} \
+} while (0)

-:90: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#90: FILE: drivers/gpu/drm/i915/intel_display.c:11147:
+#define PIPE_CONF_CHECK_M_N(name) do { \
 	if (!intel_compare_link_m_n(&current_config->name, \
 				    &pipe_config->name,\
 				    adjust)) { \

-:108: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#108: FILE: drivers/gpu/drm/i915/intel_display.c:11173:
+#define PIPE_CONF_CHECK_M_N_ALT(name, alt_name) do { \
 	if (!intel_compare_link_m_n(&current_config->name, \
 				    &pipe_config->name, adjust) && \
 	    !intel_compare_link_m_n(&current_config->alt_name, \

-:121: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#121: FILE: drivers/gpu/drm/i915/intel_display.c:11201:
+#define PIPE_CONF_CHECK_FLAGS(name, mask) do { \
 	if ((current_config->name ^ pipe_config->name) & (mask)) { \
 		pipe_config_err(adjust, __stringify(name), \
 			  "(%x) (expected %i, found %i)\n", \

-:134: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#134: FILE: drivers/gpu/drm/i915/intel_display.c:11212:
+#define PIPE_CONF_CHECK_CLOCK_FUZZY(name) do { \
 	if (!intel_fuzzy_clock_check(current_config->name, pipe_config->name)) { \
 		pipe_config_err(adjust, __stringify(name), \
 			  "(expected %i, found %i)\n", \
 			  current_config->name, \
 			  pipe_config->name); \
 		ret = false; \
+	} \
+} while (0)

total: 0 errors, 0 warnings, 9 checks, 123 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux