[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/2] drm/i915: Dynamically allocate s0ix struct for VLV

Patchwork patchwork at emeril.freedesktop.org
Tue Aug 20 02:23:49 UTC 2019


== Series Details ==

Series: series starting with [v2,1/2] drm/i915: Dynamically allocate s0ix struct for VLV
URL   : https://patchwork.freedesktop.org/series/65445/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
b14576485d52 drm/i915: Dynamically allocate s0ix struct for VLV
07c4e5f4c5d9 drm/i915: Introduce intel_reg_types.h
-:1304: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#1304: 
rename from drivers/gpu/drm/i915/i915_reg.h

-:1658: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__n' - possible side-effects?
#1658: FILE: drivers/gpu/drm/i915/intel_reg_types.h:108:
+#define REG_BIT(__n)							\
+	((u32)(BIT(__n) +						\
+	       BUILD_BUG_ON_ZERO(__is_constexpr(__n) &&		\
+				 ((__n) < 0 || (__n) > 31))))

-:1672: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__high' - possible side-effects?
#1672: FILE: drivers/gpu/drm/i915/intel_reg_types.h:122:
+#define REG_GENMASK(__high, __low)					\
+	((u32)(GENMASK(__high, __low) +					\
+	       BUILD_BUG_ON_ZERO(__is_constexpr(__high) &&	\
+				 __is_constexpr(__low) &&		\
+				 ((__low) < 0 || (__high) > 31 || (__low) > (__high)))))

-:1672: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__low' - possible side-effects?
#1672: FILE: drivers/gpu/drm/i915/intel_reg_types.h:122:
+#define REG_GENMASK(__high, __low)					\
+	((u32)(GENMASK(__high, __low) +					\
+	       BUILD_BUG_ON_ZERO(__is_constexpr(__high) &&	\
+				 __is_constexpr(__low) &&		\
+				 ((__low) < 0 || (__high) > 31 || (__low) > (__high)))))

-:1681: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__x' - possible side-effects?
#1681: FILE: drivers/gpu/drm/i915/intel_reg_types.h:131:
+#define IS_POWER_OF_2(__x)		((__x) && (((__x) & ((__x) - 1)) == 0))

-:1693: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__mask' - possible side-effects?
#1693: FILE: drivers/gpu/drm/i915/intel_reg_types.h:143:
+#define REG_FIELD_PREP(__mask, __val)						\
+	((u32)((((typeof(__mask))(__val) << __bf_shf(__mask)) & (__mask)) +	\
+	       BUILD_BUG_ON_ZERO(!__is_constexpr(__mask)) +		\
+	       BUILD_BUG_ON_ZERO((__mask) == 0 || (__mask) > U32_MAX) +		\
+	       BUILD_BUG_ON_ZERO(!IS_POWER_OF_2((__mask) + (1ULL << __bf_shf(__mask)))) + \
+	       BUILD_BUG_ON_ZERO(__builtin_choose_expr(__is_constexpr(__val), (~((__mask) >> __bf_shf(__mask)) & (__val)), 0))))

-:1693: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__val' - possible side-effects?
#1693: FILE: drivers/gpu/drm/i915/intel_reg_types.h:143:
+#define REG_FIELD_PREP(__mask, __val)						\
+	((u32)((((typeof(__mask))(__val) << __bf_shf(__mask)) & (__mask)) +	\
+	       BUILD_BUG_ON_ZERO(!__is_constexpr(__mask)) +		\
+	       BUILD_BUG_ON_ZERO((__mask) == 0 || (__mask) > U32_MAX) +		\
+	       BUILD_BUG_ON_ZERO(!IS_POWER_OF_2((__mask) + (1ULL << __bf_shf(__mask)))) + \
+	       BUILD_BUG_ON_ZERO(__builtin_choose_expr(__is_constexpr(__val), (~((__mask) >> __bf_shf(__mask)) & (__val)), 0))))

-:1698: WARNING:LONG_LINE: line over 100 characters
#1698: FILE: drivers/gpu/drm/i915/intel_reg_types.h:148:
+	       BUILD_BUG_ON_ZERO(__builtin_choose_expr(__is_constexpr(__val), (~((__mask) >> __bf_shf(__mask)) & (__val)), 0))))

-:1718: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__a' - possible side-effects?
#1718: FILE: drivers/gpu/drm/i915/intel_reg_types.h:168:
+#define _PICK_EVEN(__index, __a, __b) ((__a) + (__index) * ((__b) - (__a)))

-:1728: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'mask' - possible side-effects?
#1728: FILE: drivers/gpu/drm/i915/intel_reg_types.h:178:
+#define _MASKED_FIELD(mask, value) ({					   \
+	if (__builtin_constant_p(mask))					   \
+		BUILD_BUG_ON_MSG(((mask) & 0xffff0000), "Incorrect mask"); \
+	if (__builtin_constant_p(value))				   \
+		BUILD_BUG_ON_MSG((value) & 0xffff0000, "Incorrect value"); \
+	if (__builtin_constant_p(mask) && __builtin_constant_p(value))	   \
+		BUILD_BUG_ON_MSG((value) & ~(mask),			   \
+				 "Incorrect value for mask");		   \
+	__MASKED_FIELD(mask, value); })

-:1728: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'value' - possible side-effects?
#1728: FILE: drivers/gpu/drm/i915/intel_reg_types.h:178:
+#define _MASKED_FIELD(mask, value) ({					   \
+	if (__builtin_constant_p(mask))					   \
+		BUILD_BUG_ON_MSG(((mask) & 0xffff0000), "Incorrect mask"); \
+	if (__builtin_constant_p(value))				   \
+		BUILD_BUG_ON_MSG((value) & 0xffff0000, "Incorrect value"); \
+	if (__builtin_constant_p(mask) && __builtin_constant_p(value))	   \
+		BUILD_BUG_ON_MSG((value) & ~(mask),			   \
+				 "Incorrect value for mask");		   \
+	__MASKED_FIELD(mask, value); })

-:1740: WARNING:NEW_TYPEDEFS: do not add new typedefs
#1740: FILE: drivers/gpu/drm/i915/intel_reg_types.h:190:
+typedef struct {

total: 0 errors, 3 warnings, 9 checks, 1232 lines checked



More information about the Intel-gfx mailing list