[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Clean up the wm mem latency stuff (rev5)

Patchwork patchwork at emeril.freedesktop.org
Fri Oct 26 19:29:57 UTC 2018


== Series Details ==

Series: drm/i915: Clean up the wm mem latency stuff (rev5)
URL   : https://patchwork.freedesktop.org/series/50802/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
220f3eac5592 drm/i915: Store all wm memory latency values in .1 usec units
488b0f8bd38a drm/i915: Use the spr/cur latencies on vlv/chv/g4x
85fb6da04007 drm/i915: Eliminate skl_latency[]
d203e7e82c7a drm/i915: Add dev_priv->wm.num_levels and use it everywhere
1d35686d5190 drm/i915: Add DEFINE_SNPRINTF_ARRAY()
-:23: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'values' may be better as '(values)' to avoid precedence issues
#23: FILE: drivers/gpu/drm/i915/i915_utils.h:164:
+#define DEFINE_SNPRINTF_ARRAY(name, type, values, index, fmt, ...) \
+void name(char *_str, size_t _len, const type *values, int _nelems) \
+{ \
+	int index; \
+	if (_len) \
+		_str[0] = '\0'; \
+	for (index = 0; index < _nelems; index++) { \
+		int _r = snprintf(_str, _len, "%s" fmt, \
+				  index ? ", " : "", __VA_ARGS__); \
+		if (_r >= _len) \
+			return; \
+		_str += _r; \
+		_len -= _r; \
+	} \
+}

-:23: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'index' - possible side-effects?
#23: FILE: drivers/gpu/drm/i915/i915_utils.h:164:
+#define DEFINE_SNPRINTF_ARRAY(name, type, values, index, fmt, ...) \
+void name(char *_str, size_t _len, const type *values, int _nelems) \
+{ \
+	int index; \
+	if (_len) \
+		_str[0] = '\0'; \
+	for (index = 0; index < _nelems; index++) { \
+		int _r = snprintf(_str, _len, "%s" fmt, \
+				  index ? ", " : "", __VA_ARGS__); \
+		if (_r >= _len) \
+			return; \
+		_str += _r; \
+		_len -= _r; \
+	} \
+}

-:23: WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#23: FILE: drivers/gpu/drm/i915/i915_utils.h:164:
+#define DEFINE_SNPRINTF_ARRAY(name, type, values, index, fmt, ...) \
+void name(char *_str, size_t _len, const type *values, int _nelems) \
+{ \
+	int index; \
+	if (_len) \
+		_str[0] = '\0'; \
+	for (index = 0; index < _nelems; index++) { \
+		int _r = snprintf(_str, _len, "%s" fmt, \
+				  index ? ", " : "", __VA_ARGS__); \
+		if (_r >= _len) \
+			return; \
+		_str += _r; \
+		_len -= _r; \
+	} \
+}

-:24: CHECK:SPACING: spaces preferred around that '*' (ctx:WxV)
#24: FILE: drivers/gpu/drm/i915/i915_utils.h:165:
+void name(char *_str, size_t _len, const type *values, int _nelems) \
                                               ^

total: 0 errors, 1 warnings, 3 checks, 43 lines checked
77b004210eef drm/i915: Make the WM memory latency print more compact
6f3fc5d3ba43 drm/i915: Eliminate redundant ilk sprite/cursor wm fixup code
10560badd17a drm/i915: Split skl+ and ilk+ read_wm_latency()
9ccb87dce343 drm/i915: Sanitize wm latency values for ilk+
6e843686038c drm/i915: Drop the funky ilk wm setup
d470fc61e2ab drm/i915: Allow LP3 watermarks on ILK
d0ae9981700d drm/i915: Remove the remnants of the ilk+ LP0 wm hack



More information about the Intel-gfx mailing list