[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Make GEN macros more similar
Patchwork
patchwork at emeril.freedesktop.org
Thu Nov 1 09:30:28 UTC 2018
== Series Details ==
Series: Make GEN macros more similar
URL : https://patchwork.freedesktop.org/series/51860/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
84d61579c8b9 drm/i915: let IS_GEN receive 1 or 2 arguments
51b9316b0b74 drm/i915: replace IS_GEN<N> with IS_GEN(..., N)
-:230: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects?
#230: FILE: drivers/gpu/drm/i915/i915_drv.h:2542:
+#define IS_GEN9_LP(dev_priv) (IS_GEN(dev_priv, 9) && IS_LP(dev_priv))
-:231: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects?
#231: FILE: drivers/gpu/drm/i915/i915_drv.h:2543:
+#define IS_GEN9_BC(dev_priv) (IS_GEN(dev_priv, 9) && !IS_LP(dev_priv))
-:249: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects?
#249: FILE: drivers/gpu/drm/i915/i915_drv.h:2616:
+#define HAS_128_BYTE_Y_TILING(dev_priv) (!IS_GEN(dev_priv, 2) && \
!(IS_I915G(dev_priv) || \
IS_I915GM(dev_priv)))
-:409: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "!r"
#409: FILE: drivers/gpu/drm/i915/i915_gem_stolen.c:159:
+ if (r == NULL && !IS_GEN(dev_priv, 3)) {
-:1094: CHECK:CAMELCASE: Avoid CamelCase: <ILK_eDP_A_DISABLE>
#1094: FILE: drivers/gpu/drm/i915/intel_display.c:14037:
+ if (IS_GEN(dev_priv, 5) && (I915_READ(FUSE_STRAP) & ILK_eDP_A_DISABLE))
total: 0 errors, 0 warnings, 5 checks, 1759 lines checked
8ddcd15d8033 drm/i915: merge gen checks to use range
d7cce02ca89e drm/i915: add helper IS_GEN_* macros
-:20: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'g' may be better as '(g)' to avoid precedence issues
#20: FILE: drivers/gpu/drm/i915/i915_drv.h:2373:
+#define IS_GEN_GT(dev_priv, g) (g > (dev_priv)->info.gen)
-:21: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'g' may be better as '(g)' to avoid precedence issues
#21: FILE: drivers/gpu/drm/i915/i915_drv.h:2374:
+#define IS_GEN_GE(dev_priv, g) (g >= (dev_priv)->info.gen)
-:22: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'g' may be better as '(g)' to avoid precedence issues
#22: FILE: drivers/gpu/drm/i915/i915_drv.h:2375:
+#define IS_GEN_LT(dev_priv, g) (g < (dev_priv)->info.gen)
-:23: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'g' may be better as '(g)' to avoid precedence issues
#23: FILE: drivers/gpu/drm/i915/i915_drv.h:2376:
+#define IS_GEN_LE(dev_priv, g) (g <= (dev_priv)->info.gen)
total: 0 errors, 0 warnings, 4 checks, 11 lines checked
b4c18b9f7af8 RFC: drm/i915: convert a few cases to the helper IS_GEN_* macros
-:71: WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 63)
#71: FILE: drivers/gpu/drm/i915/i915_debugfs.c:1759:
+ if (IS_GEN_GE(dev_priv, 9))
/* no global SR status; inspect per-plane WM */;
-:204: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#204: FILE: drivers/gpu/drm/i915/i915_reg.h:3794:
+#define GT_INTERVAL_FROM_US(dev_priv, us) (IS_GEN_GE(dev_priv, 9) ? \
(IS_GEN9_LP(dev_priv) ? \
INTERVAL_0_833_US(us) : \
INTERVAL_1_33_US(us)) : \
-:204: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects?
#204: FILE: drivers/gpu/drm/i915/i915_reg.h:3794:
+#define GT_INTERVAL_FROM_US(dev_priv, us) (IS_GEN_GE(dev_priv, 9) ? \
(IS_GEN9_LP(dev_priv) ? \
INTERVAL_0_833_US(us) : \
INTERVAL_1_33_US(us)) : \
-:204: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'us' - possible side-effects?
#204: FILE: drivers/gpu/drm/i915/i915_reg.h:3794:
+#define GT_INTERVAL_FROM_US(dev_priv, us) (IS_GEN_GE(dev_priv, 9) ? \
(IS_GEN9_LP(dev_priv) ? \
INTERVAL_0_833_US(us) : \
INTERVAL_1_33_US(us)) : \
-:213: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#213: FILE: drivers/gpu/drm/i915/i915_reg.h:3803:
+#define GT_PM_INTERVAL_TO_US(dev_priv, interval) (IS_GEN_GE(dev_priv, 9) ? \
(IS_GEN9_LP(dev_priv) ? \
INTERVAL_0_833_TO_US(interval) : \
INTERVAL_1_33_TO_US(interval)) : \
-:213: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects?
#213: FILE: drivers/gpu/drm/i915/i915_reg.h:3803:
+#define GT_PM_INTERVAL_TO_US(dev_priv, interval) (IS_GEN_GE(dev_priv, 9) ? \
(IS_GEN9_LP(dev_priv) ? \
INTERVAL_0_833_TO_US(interval) : \
INTERVAL_1_33_TO_US(interval)) : \
-:213: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'interval' - possible side-effects?
#213: FILE: drivers/gpu/drm/i915/i915_reg.h:3803:
+#define GT_PM_INTERVAL_TO_US(dev_priv, interval) (IS_GEN_GE(dev_priv, 9) ? \
(IS_GEN9_LP(dev_priv) ? \
INTERVAL_0_833_TO_US(interval) : \
INTERVAL_1_33_TO_US(interval)) : \
-:667: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'intel_dp->psr_dpcd[0] == DP_PSR2_WITH_Y_COORD_IS_SUPPORTED'
#667: FILE: drivers/gpu/drm/i915/intel_psr.c:245:
+ if (IS_GEN_GE(dev_priv, 9) &&
(intel_dp->psr_dpcd[0] == DP_PSR2_WITH_Y_COORD_IS_SUPPORTED)) {
total: 2 errors, 1 warnings, 5 checks, 584 lines checked
More information about the Intel-gfx
mailing list