[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/rect: Round above 1 << 16 upwards to correct scale calculation functions.

Patchwork patchwork at emeril.freedesktop.org
Thu Apr 26 08:59:33 UTC 2018


== Series Details ==

Series: series starting with [1/3] drm/rect: Round above 1 << 16 upwards to correct scale calculation functions.
URL   : https://patchwork.freedesktop.org/series/42317/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
3e26302006d1 drm/rect: Round above 1 << 16 upwards to correct scale calculation functions.
-:25: WARNING:UNNECESSARY_ELSE: else is not generally useful after a break or return
#25: FILE: drivers/gpu/drm/drm_rect.c:111:
+		return DIV_ROUND_UP(src, dst);
+	else

total: 0 errors, 1 warnings, 0 checks, 47 lines checked
4362fe643c06 drm/rect: Handle rounding errors in drm_rect_clip_scaled
-:33: WARNING:UNNECESSARY_ELSE: else is not generally useful after a break or return
#33: FILE: drivers/gpu/drm/drm_rect.c:65:
+		return DIV_ROUND_UP(src, dst);
+	else

-:52: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'oldscale' - possible side-effects?
#52: FILE: drivers/gpu/drm/drm_rect.c:98:
+#define FIXUP(oldscale, fn, m, second) do { \
+	if (oldscale != 1 << 16) { \
+		int newscale = drm_calc_scale(fn(src), fn(dst)); \
+ \
+		if (newscale < 0) \
+			return false; \
+ \
+		if ((oldscale < 0x10000) != (newscale < 0x10000)) { \
+			if (!second) \
+				src->m##1 = src->m##2 - ((fn(dst) - diff) << 16); \
+			else \
+				src->m##2 = src->m##1 + ((fn(dst) - diff) << 16); \
+		} \
+	} \
+ } while (0)

-:52: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fn' - possible side-effects?
#52: FILE: drivers/gpu/drm/drm_rect.c:98:
+#define FIXUP(oldscale, fn, m, second) do { \
+	if (oldscale != 1 << 16) { \
+		int newscale = drm_calc_scale(fn(src), fn(dst)); \
+ \
+		if (newscale < 0) \
+			return false; \
+ \
+		if ((oldscale < 0x10000) != (newscale < 0x10000)) { \
+			if (!second) \
+				src->m##1 = src->m##2 - ((fn(dst) - diff) << 16); \
+			else \
+				src->m##2 = src->m##1 + ((fn(dst) - diff) << 16); \
+		} \
+	} \
+ } while (0)

-:55: WARNING:LEADING_SPACE: please, no spaces at the start of a line
#55: FILE: drivers/gpu/drm/drm_rect.c:101:
+ \$

-:58: WARNING:LEADING_SPACE: please, no spaces at the start of a line
#58: FILE: drivers/gpu/drm/drm_rect.c:104:
+ \$

-:59: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'oldscale < 0x10000'
#59: FILE: drivers/gpu/drm/drm_rect.c:105:
+		if ((oldscale < 0x10000) != (newscale < 0x10000)) { \

-:59: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'newscale < 0x10000'
#59: FILE: drivers/gpu/drm/drm_rect.c:105:
+		if ((oldscale < 0x10000) != (newscale < 0x10000)) { \

-:66: WARNING:LEADING_SPACE: please, no spaces at the start of a line
#66: FILE: drivers/gpu/drm/drm_rect.c:112:
+ } while (0)$

total: 0 errors, 4 warnings, 4 checks, 102 lines checked
968d77e5a49f drm/i915: Do not adjust scale when out of bounds, v2.
-:180: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#180: FILE: drivers/gpu/drm/i915/intel_sprite.c:1030:
+			if (INTEL_GEN(dev_priv) < 9 && (

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



More information about the Intel-gfx mailing list