[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/fbc: More multi-FBC refactoring

Patchwork
2021-12-10T07:30:20Z

== Series Details ==

Series: drm/i915/fbc: More multi-FBC refactoring
URL : https://patchwork.freedesktop.org/series/97821/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
62abcc4d9d95 drm/i915/fbc: Parametrize FBC register offsets
8d70368946f6 drm/i915/fbc: Loop through FBC instances in various places
-:38: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__fbc_id' - possible side-effects?
#38: FILE: drivers/gpu/drm/i915/display/intel_fbc.c:52:
+#define for_each_fbc_id(__fbc_id) \
+ for ((__fbc_id) = FBC_A; (__fbc_id) < I915_MAX_FBCS; (__fbc_id)++)

-:41: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#41: FILE: drivers/gpu/drm/i915/display/intel_fbc.c:55:
+#define for_each_intel_fbc(__dev_priv, __fbc, __fbc_id) \
+ for_each_fbc_id(__fbc_id) \
+ for_each_if((__fbc) = (__dev_priv)->fbc[(__fbc_id)])

-:41: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__fbc_id' - possible side-effects?
#41: FILE: drivers/gpu/drm/i915/display/intel_fbc.c:55:
+#define for_each_intel_fbc(__dev_priv, __fbc, __fbc_id) \
+ for_each_fbc_id(__fbc_id) \
+ for_each_if((__fbc) = (__dev_priv)->fbc[(__fbc_id)])

-:111: CHECK:BRACES: Blank lines aren't necessary before a close brace '}'
#111: FILE: drivers/gpu/drm/i915/display/intel_fbc.c:1344:
+
+}

total: 1 errors, 0 warnings, 3 checks, 256 lines checked
4de4d56f03ea drm/i915/fbc: Introduce device info fbc_mask
-:29: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__fbc_id' - possible side-effects?
#29: FILE: drivers/gpu/drm/i915/display/intel_fbc.c:52:
+#define for_each_fbc_id(__dev_priv, __fbc_id) \
+ for ((__fbc_id) = FBC_A; (__fbc_id) < I915_MAX_FBCS; (__fbc_id)++) \
+ for_each_if(INTEL_INFO(__dev_priv)->fbc_mask & BIT(__fbc_id))

total: 0 errors, 0 warnings, 1 checks, 231 lines checked