[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Make GEN macros more similar (rev2)

Patchwork patchwork at emeril.freedesktop.org
Wed Nov 7 14:10:39 UTC 2018


== Series Details ==

Series: Make GEN macros more similar (rev2)
URL   : https://patchwork.freedesktop.org/series/51860/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
d15504ef1f13 Revert "drm/i915: Kill GEN_FOREVER"
322b4c9622f1 drm/i915: Rename IS_GEN to GT_RANGE
0bbf4afc4405 drm/i915: replace IS_GEN<N> with GT_GEN(..., N)
-:263: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects?
#263: FILE: drivers/gpu/drm/i915/i915_drv.h:2536:
+#define IS_GEN9_LP(dev_priv)	(GT_GEN(dev_priv, 9) && IS_LP(dev_priv))

-:264: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects?
#264: FILE: drivers/gpu/drm/i915/i915_drv.h:2537:
+#define IS_GEN9_BC(dev_priv)	(GT_GEN(dev_priv, 9) && !IS_LP(dev_priv))

-:282: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects?
#282: FILE: drivers/gpu/drm/i915/i915_drv.h:2610:
+#define HAS_128_BYTE_Y_TILING(dev_priv) (!GT_GEN(dev_priv, 2) && \
 					 !(IS_I915G(dev_priv) || \
 					 IS_I915GM(dev_priv)))

-:442: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "!r"
#442: FILE: drivers/gpu/drm/i915/i915_gem_stolen.c:159:
+		if (r == NULL && !GT_GEN(dev_priv, 3)) {

-:1127: CHECK:CAMELCASE: Avoid CamelCase: <ILK_eDP_A_DISABLE>
#1127: FILE: drivers/gpu/drm/i915/intel_display.c:14047:
+	if (GT_GEN(dev_priv, 5) && (I915_READ(FUSE_STRAP) & ILK_eDP_A_DISABLE))

total: 0 errors, 0 warnings, 5 checks, 1787 lines checked
36dad133f489 drm/i915: rename IS_GEN9_* to GT_GEN9_*
-:169: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects?
#169: FILE: drivers/gpu/drm/i915/i915_drv.h:2386:
+#define GT_GEN9_LP(dev_priv)	(GT_GEN(dev_priv, 9) && IS_LP(dev_priv))

-:170: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects?
#170: FILE: drivers/gpu/drm/i915/i915_drv.h:2387:
+#define GT_GEN9_BC(dev_priv)	(GT_GEN(dev_priv, 9) && !IS_LP(dev_priv))

-:293: ERROR:CODE_INDENT: code indent should use tabs where possible
#293: FILE: drivers/gpu/drm/i915/i915_reg.h:3826:
+                           (GT_GEN9_LP(dev_priv) ? \$

-:293: WARNING:LEADING_SPACE: please, no spaces at the start of a line
#293: FILE: drivers/gpu/drm/i915/i915_reg.h:3826:
+                           (GT_GEN9_LP(dev_priv) ? \$

-:1311: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around '!intel_dsi->dual_link'
#1311: FILE: drivers/gpu/drm/i915/vlv_dsi.c:1444:
+		if (GT_GEN9_LP(dev_priv) && (!intel_dsi->dual_link)) {

total: 1 errors, 1 warnings, 3 checks, 1093 lines checked
8d54865b9953 drm/i915: replace gen checks using operators by GT_GEN/GT_GEN_RANGE
-:179: WARNING:LONG_LINE: line over 100 characters
#179: FILE: drivers/gpu/drm/i915/i915_debugfs.c:1204:
+			   (gt_perf_status & (GT_GEN_RANGE(dev_priv, 9, GEN_FOREVER) ? 0x1ff00 : 0xff00)) >> 8);

-:321: WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 63)
#321: FILE: drivers/gpu/drm/i915/i915_debugfs.c:1759:
+	if (GT_GEN_RANGE(dev_priv, 9, GEN_FOREVER))
 		/* no global SR status; inspect per-plane WM */;

-:674: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects?
#674: FILE: drivers/gpu/drm/i915/i915_drv.h:2604:
+#define HAS_GMBUS_BURST_READ(dev_priv) (GT_GEN_RANGE(dev_priv, 10, GEN_FOREVER) || \
 					IS_GEMINILAKE(dev_priv) || \
 					IS_KABYLAKE(dev_priv))

-:683: WARNING:SPACE_BEFORE_TAB: please, no space before tabs
#683: FILE: drivers/gpu/drm/i915/i915_drv.h:2617:
+#define HAS_FW_BLC(dev_priv) ^I(GT_GEN_RANGE(dev_priv, 3, GEN_FOREVER))$

-:686: WARNING:LONG_LINE: line over 100 characters
#686: FILE: drivers/gpu/drm/i915/i915_drv.h:2619:
+#define HAS_CUR_FBC(dev_priv)	(!HAS_GMCH_DISPLAY(dev_priv) && GT_GEN_RANGE(dev_priv, 7, GEN_FOREVER))

-:686: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects?
#686: FILE: drivers/gpu/drm/i915/i915_drv.h:2619:
+#define HAS_CUR_FBC(dev_priv)	(!HAS_GMCH_DISPLAY(dev_priv) && GT_GEN_RANGE(dev_priv, 7, GEN_FOREVER))

-:1609: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#1609: FILE: drivers/gpu/drm/i915/i915_reg.h:3816:
+#define GT_INTERVAL_FROM_US(dev_priv, us) (GT_GEN_RANGE(dev_priv, 9, GEN_FOREVER) ? \
 				(GT_GEN9_LP(dev_priv) ? \
 				INTERVAL_0_833_US(us) : \
 				INTERVAL_1_33_US(us)) : \

-:1609: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects?
#1609: FILE: drivers/gpu/drm/i915/i915_reg.h:3816:
+#define GT_INTERVAL_FROM_US(dev_priv, us) (GT_GEN_RANGE(dev_priv, 9, GEN_FOREVER) ? \
 				(GT_GEN9_LP(dev_priv) ? \
 				INTERVAL_0_833_US(us) : \
 				INTERVAL_1_33_US(us)) : \

-:1609: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'us' - possible side-effects?
#1609: FILE: drivers/gpu/drm/i915/i915_reg.h:3816:
+#define GT_INTERVAL_FROM_US(dev_priv, us) (GT_GEN_RANGE(dev_priv, 9, GEN_FOREVER) ? \
 				(GT_GEN9_LP(dev_priv) ? \
 				INTERVAL_0_833_US(us) : \
 				INTERVAL_1_33_US(us)) : \

-:1618: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#1618: FILE: drivers/gpu/drm/i915/i915_reg.h:3825:
+#define GT_PM_INTERVAL_TO_US(dev_priv, interval) (GT_GEN_RANGE(dev_priv, 9, GEN_FOREVER) ? \
                            (GT_GEN9_LP(dev_priv) ? \
                            INTERVAL_0_833_TO_US(interval) : \
                            INTERVAL_1_33_TO_US(interval)) : \

-:1618: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects?
#1618: FILE: drivers/gpu/drm/i915/i915_reg.h:3825:
+#define GT_PM_INTERVAL_TO_US(dev_priv, interval) (GT_GEN_RANGE(dev_priv, 9, GEN_FOREVER) ? \
                            (GT_GEN9_LP(dev_priv) ? \
                            INTERVAL_0_833_TO_US(interval) : \
                            INTERVAL_1_33_TO_US(interval)) : \

-:1618: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'interval' - possible side-effects?
#1618: FILE: drivers/gpu/drm/i915/i915_reg.h:3825:
+#define GT_PM_INTERVAL_TO_US(dev_priv, interval) (GT_GEN_RANGE(dev_priv, 9, GEN_FOREVER) ? \
                            (GT_GEN9_LP(dev_priv) ? \
                            INTERVAL_0_833_TO_US(interval) : \
                            INTERVAL_1_33_TO_US(interval)) : \

-:2429: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'port == PORT_E'
#2429: FILE: drivers/gpu/drm/i915/intel_display.c:9502:
+	if (GT_GEN_RANGE(dev_priv, 0, 8) &&
 	    (port == PORT_E) && I915_READ(LPT_TRANSCONF) & TRANS_ENABLE) {

-:2877: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#2877: FILE: drivers/gpu/drm/i915/intel_display.c:15845:
+	unsigned reg = GT_GEN_RANGE(dev_priv, 6, GEN_FOREVER) ? SNB_GMCH_CTRL : INTEL_GMCH_CTRL;

-:3185: WARNING:BRACES: braces {} are not necessary for single statement blocks
#3185: FILE: drivers/gpu/drm/i915/intel_engine_cs.c:1306:
+	if (GT_GEN_RANGE(dev_priv, 6, GEN_FOREVER)) {
 		drm_printf(m, "\tRING_IMR: %08x\n", I915_READ_IMR(engine));
 	}

-:4249: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'intel_dp->psr_dpcd[0] == DP_PSR2_WITH_Y_COORD_IS_SUPPORTED'
#4249: FILE: drivers/gpu/drm/i915/intel_psr.c:245:
+	if (GT_GEN_RANGE(dev_priv, 9, GEN_FOREVER) &&
 	    (intel_dp->psr_dpcd[0] == DP_PSR2_WITH_Y_COORD_IS_SUPPORTED)) {

-:4547: WARNING:BRACES: braces {} are not necessary for single statement blocks
#4547: FILE: drivers/gpu/drm/i915/intel_sdvo.c:2454:
+	if (GT_GEN_RANGE(dev_priv, 4, GEN_FOREVER) && IS_MOBILE(dev_priv)) {
 		intel_attach_broadcast_rgb_property(&connector->base.base);
 	}

total: 2 errors, 7 warnings, 8 checks, 4310 lines checked
90392f31f7da drm/i915: merge gen checks to use range
73c65e0e7e5f drm/i915: remove INTEL_GEN macro



More information about the Intel-gfx mailing list