[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: the great header refactoring, part three

Patchwork patchwork at emeril.freedesktop.org
Thu May 2 18:26:50 UTC 2019


== Series Details ==

Series: drm/i915: the great header refactoring, part three
URL   : https://patchwork.freedesktop.org/series/60215/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
ac0fcd25f9fa drm/i915/dvo: move DVO chip types to intel_dvo.c
ecb082b73857 drm/i915/dsi: move operation mode types to intel_dsi.h
552591452252 drm/i915: move ranges to intel_display.c
e368306364d2 drm/i915: remove unused/stale macros and comments from intel_drv.h
81d05aed68fb drm/i915/csr: move CSR version macros to intel_csr.h
aac80847f4f3 drm/i915: extract intel_dpio_phy.h from i915_drv.h
-:133: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#133: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 161 lines checked
a23255f00364 drm/i915: extract intel_lpe_audio.h from i915_drv.h
-:107: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#107: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 83 lines checked
cf9b5978fcef drm/i915: extract intel_acpi.h from i915_drv.h
-:82: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#82: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 65 lines checked
50ea3b222b58 drm/i915: extract i915_debugfs.h from i915_drv.h
-:45: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#45: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 98 lines checked
4cbadf6de15f drm/i915: move i915_vgacntrl_reg() where needed
e897718d1a6e drm/i915: make i915_utils.h self-contained
5204035ef050 drm/i915: move more generic utils to i915_utils.h
-:96: ERROR:CODE_INDENT: code indent should use tabs where possible
#96: FILE: drivers/gpu/drm/i915/i915_utils.h:194:
+        return min_t(u64, MAX_JIFFY_OFFSET, nsecs_to_jiffies64(n) + 1);$

-:96: WARNING:LEADING_SPACE: please, no spaces at the start of a line
#96: FILE: drivers/gpu/drm/i915/i915_utils.h:194:
+        return min_t(u64, MAX_JIFFY_OFFSET, nsecs_to_jiffies64(n) + 1);$

-:134: CHECK:CAMELCASE: Avoid CamelCase: <Wmin>
#134: FILE: drivers/gpu/drm/i915/i915_utils.h:232:
+#define __wait_for(OP, COND, US, Wmin, Wmax) ({ \

-:134: CHECK:CAMELCASE: Avoid CamelCase: <Wmax>
#134: FILE: drivers/gpu/drm/i915/i915_utils.h:232:
+#define __wait_for(OP, COND, US, Wmin, Wmax) ({ \

-:165: ERROR:IN_ATOMIC: do not use in_atomic in drivers
#165: FILE: drivers/gpu/drm/i915/i915_utils.h:263:
+# define _WAIT_FOR_ATOMIC_CHECK(ATOMIC) WARN_ON_ONCE((ATOMIC) && !in_atomic())

-:170: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'ATOMIC' - possible side-effects?
#170: FILE: drivers/gpu/drm/i915/i915_utils.h:268:
+#define _wait_for_atomic(COND, US, ATOMIC) \
+({ \
+	int cpu, ret, timeout = (US) * 1000; \
+	u64 base; \
+	_WAIT_FOR_ATOMIC_CHECK(ATOMIC); \
+	if (!(ATOMIC)) { \
+		preempt_disable(); \
+		cpu = smp_processor_id(); \
+	} \
+	base = local_clock(); \
+	for (;;) { \
+		u64 now = local_clock(); \
+		if (!(ATOMIC)) \
+			preempt_enable(); \
+		/* Guarantee COND check prior to timeout */ \
+		barrier(); \
+		if (COND) { \
+			ret = 0; \
+			break; \
+		} \
+		if (now - base >= timeout) { \
+			ret = -ETIMEDOUT; \
+			break; \
+		} \
+		cpu_relax(); \
+		if (!(ATOMIC)) { \
+			preempt_disable(); \
+			if (unlikely(cpu != smp_processor_id())) { \
+				timeout -= now - base; \
+				cpu = smp_processor_id(); \
+				base = local_clock(); \
+			} \
+		} \
+	} \
+	ret; \
+})

-:207: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'COND' - possible side-effects?
#207: FILE: drivers/gpu/drm/i915/i915_utils.h:305:
+#define wait_for_us(COND, US) \
+({ \
+	int ret__; \
+	BUILD_BUG_ON(!__builtin_constant_p(US)); \
+	if ((US) > 10) \
+		ret__ = _wait_for((COND), (US), 10, 10); \
+	else \
+		ret__ = _wait_for_atomic((COND), (US), 0); \
+	ret__; \
+})

-:207: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'US' - possible side-effects?
#207: FILE: drivers/gpu/drm/i915/i915_utils.h:305:
+#define wait_for_us(COND, US) \
+({ \
+	int ret__; \
+	BUILD_BUG_ON(!__builtin_constant_p(US)); \
+	if ((US) > 10) \
+		ret__ = _wait_for((COND), (US), 10, 10); \
+	else \
+		ret__ = _wait_for_atomic((COND), (US), 0); \
+	ret__; \
+})

-:218: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'US' - possible side-effects?
#218: FILE: drivers/gpu/drm/i915/i915_utils.h:316:
+#define wait_for_atomic_us(COND, US) \
+({ \
+	BUILD_BUG_ON(!__builtin_constant_p(US)); \
+	BUILD_BUG_ON((US) > 50000); \
+	_wait_for_atomic((COND), (US), 1); \
+})

total: 2 errors, 1 warnings, 6 checks, 329 lines checked
df6c90b06bff drm/i915: extract intel_gmbus.h from i915_drv.h and rename intel_i2c.c
-:202: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#202: 
rename from drivers/gpu/drm/i915/intel_i2c.c

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



More information about the Intel-gfx mailing list