From: Patchwork <patchwork@emeril.freedesktop.org>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: ✗ Fi.CI.CHECKPATCH: warning for drm: Fix rounding errors and use scaling in i915.
Date: Mon, 30 Apr 2018 14:16:42 -0000 [thread overview]
Message-ID: <20180430141642.24131.96035@emeril.freedesktop.org> (raw)
In-Reply-To: <20180430134611.50988-1-maarten.lankhorst@linux.intel.com>
== Series Details ==
Series: drm: Fix rounding errors and use scaling in i915.
URL : https://patchwork.freedesktop.org/series/42476/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
febeff5693c0 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
339983c9bb65 drm/rect: Handle rounding errors in drm_rect_clip_scaled, v2.
-:37: WARNING:UNNECESSARY_ELSE: else is not generally useful after a break or return
#37: FILE: drivers/gpu/drm/drm_rect.c:65:
+ return DIV_ROUND_UP(src, dst);
+ else
-:56: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'oldscale' - possible side-effects?
#56: 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) << 16); \
+ else \
+ src->m##2 = src->m##1 + (fn(dst) << 16); \
+ } \
+ } \
+ } while (0)
-:56: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fn' - possible side-effects?
#56: 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) << 16); \
+ else \
+ src->m##2 = src->m##1 + (fn(dst) << 16); \
+ } \
+ } \
+ } while (0)
-:59: WARNING:LEADING_SPACE: please, no spaces at the start of a line
#59: FILE: drivers/gpu/drm/drm_rect.c:101:
+ \$
-:62: WARNING:LEADING_SPACE: please, no spaces at the start of a line
#62: FILE: drivers/gpu/drm/drm_rect.c:104:
+ \$
-:63: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'oldscale < 0x10000'
#63: FILE: drivers/gpu/drm/drm_rect.c:105:
+ if ((oldscale < 0x10000) != (newscale < 0x10000)) { \
-:63: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'newscale < 0x10000'
#63: FILE: drivers/gpu/drm/drm_rect.c:105:
+ if ((oldscale < 0x10000) != (newscale < 0x10000)) { \
-:70: WARNING:LEADING_SPACE: please, no spaces at the start of a line
#70: FILE: drivers/gpu/drm/drm_rect.c:112:
+ } while (0)$
total: 0 errors, 4 warnings, 4 checks, 107 lines checked
035d2ea322b2 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
882b62db73fa drm/selftests: Rename the Kconfig option to CONFIG_DRM_DEBUG_SELFTEST
59b43359b5d7 drm/selftests: Add drm helper selftest
-:28: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#28:
new file mode 100644
-:48: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1
#48: FILE: drivers/gpu/drm/selftests/test-drm-helper.c:1:
+/*
-:63: WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#63: FILE: drivers/gpu/drm/selftests/test-drm-helper.c:16:
+#define FAIL(test, msg, ...) \
+ do { \
+ if (test) { \
+ pr_err("%s/%u: " msg, __FUNCTION__, __LINE__, ##__VA_ARGS__); \
+ return -EINVAL; \
+ } \
+ } while (0)
-:66: WARNING:USE_FUNC: __func__ should be used instead of gcc specific __FUNCTION__
#66: FILE: drivers/gpu/drm/selftests/test-drm-helper.c:19:
+ pr_err("%s/%u: " msg, __FUNCTION__, __LINE__, ##__VA_ARGS__); \
-:71: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects?
#71: FILE: drivers/gpu/drm/selftests/test-drm-helper.c:24:
+#define FAIL_ON(x) FAIL((x), "%s", "FAIL_ON(" __stringify(x) ")\n")
-:74: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#74: FILE: drivers/gpu/drm/selftests/test-drm-helper.c:27:
+ unsigned src_x, unsigned src_y,
-:74: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#74: FILE: drivers/gpu/drm/selftests/test-drm-helper.c:27:
+ unsigned src_x, unsigned src_y,
-:75: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#75: FILE: drivers/gpu/drm/selftests/test-drm-helper.c:28:
+ unsigned src_w, unsigned src_h)
-:75: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#75: FILE: drivers/gpu/drm/selftests/test-drm-helper.c:28:
+ unsigned src_w, unsigned src_h)
-:84: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#84: FILE: drivers/gpu/drm/selftests/test-drm-helper.c:37:
+ unsigned src_x, unsigned src_y,
-:84: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#84: FILE: drivers/gpu/drm/selftests/test-drm-helper.c:37:
+ unsigned src_x, unsigned src_y,
-:85: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#85: FILE: drivers/gpu/drm/selftests/test-drm-helper.c:38:
+ unsigned src_w, unsigned src_h)
-:85: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#85: FILE: drivers/gpu/drm/selftests/test-drm-helper.c:38:
+ unsigned src_w, unsigned src_h)
-:111: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#111: FILE: drivers/gpu/drm/selftests/test-drm-helper.c:64:
+ unsigned crtc_w, unsigned crtc_h)
-:111: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#111: FILE: drivers/gpu/drm/selftests/test-drm-helper.c:64:
+ unsigned crtc_w, unsigned crtc_h)
-:121: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#121: FILE: drivers/gpu/drm/selftests/test-drm-helper.c:74:
+ unsigned crtc_w, unsigned crtc_h)
-:121: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#121: FILE: drivers/gpu/drm/selftests/test-drm-helper.c:74:
+ unsigned crtc_w, unsigned crtc_h)
-:145: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#145: FILE: drivers/gpu/drm/selftests/test-drm-helper.c:98:
+ DRM_MODE("1024x768", 0, 65000, 1024, 1048,
+ 1184, 1344, 0, 768, 771, 777, 806, 0,
total: 0 errors, 16 warnings, 2 checks, 265 lines checked
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-04-30 14:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-30 13:46 [PATCH 0/5] drm: Fix rounding errors and use scaling in i915 Maarten Lankhorst
2018-04-30 13:46 ` [PATCH 1/5] drm/rect: Round above 1 << 16 upwards to correct scale calculation functions Maarten Lankhorst
2018-04-30 13:46 ` [PATCH 2/5] drm/rect: Handle rounding errors in drm_rect_clip_scaled, v2 Maarten Lankhorst
2018-04-30 13:46 ` [PATCH 3/5] drm/i915: Do not adjust scale when out of bounds, v2 Maarten Lankhorst
2018-04-30 13:46 ` [PATCH 4/5] drm/selftests: Rename the Kconfig option to CONFIG_DRM_DEBUG_SELFTEST Maarten Lankhorst
2018-04-30 13:46 ` [PATCH 5/5] drm/selftests: Add drm helper selftest Maarten Lankhorst
2018-04-30 14:16 ` Patchwork [this message]
2018-04-30 14:17 ` ✗ Fi.CI.SPARSE: warning for drm: Fix rounding errors and use scaling in i915 Patchwork
2018-04-30 14:32 ` ✓ Fi.CI.BAT: success " Patchwork
2018-04-30 19:50 ` ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180430141642.24131.96035@emeril.freedesktop.org \
--to=patchwork@emeril.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox