drm/i915: avoid harmless empty-body warning
Subsystems (2)
PATCH 1/1 drm/i915: avoid harmless empty-body warning
The newly added assert_kernel_context_is_current introduces a warning when built with W=1:
drivers/gpu/drm/i915/i915_gem.c: In function ‘assert_kernel_context_is_current’:drivers/gpu/drm/i915/i915_gem.c:4417:63: error: suggest braces around empty body in an ‘else’ statement [-Werror=empty-body]
Changing the GEM_BUG_ON() macro from an empty definition to "do { } while (0)" makes the macro more robust to use and avoids the warning.
--- drivers/gpu/drm/i915/i915_gem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem.h +1 -1
@@ -28,7 +28,7 @@#ifdef CONFIG_DRM_I915_DEBUG_GEM #define GEM_BUG_ON (expr) BUG_ON(expr)#else -#define GEM_BUG_ON (expr) +#define GEM_BUG_ON (expr) do { } while (0)#endif #define I915_NUM_ENGINES 5
Signature · 6 lines
2.9.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 11 lines · Arnd Bergmann
The newly added
assert_kernel_context_is_currentintroduces a warning when built with W=1:
drivers/gpu/drm/i915/i915_gem.c: In function ‘assert_kernel_context_is_current’:drivers/gpu/drm/i915/i915_gem.c:4417:63: error: suggest braces around empty body in an ‘else’ statement [-Werror=empty-body]Changing the
GEM_BUG_ON()macro from an empty definition to "do { } while (0)" makes the macro more robust to use and avoids the warning.Fixes 3033acab07f9 ("drm/i915: Queue the idling context switch after all other timelines")Signed-off-by Arnd Bergmann <[email protected]>
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter
AppliedQuoted 7 lines · Chris Wilson
Quoted 6 lines · Arnd Bergmann
The newly added
assert_kernel_context_is_currentintroduces a warning when built with W=1:
drivers/gpu/drm/i915/i915_gem.c: In function ‘assert_kernel_context_is_current’:drivers/gpu/drm/i915/i915_gem.c:4417:63: error: suggest braces around empty body in an ‘else’ statement [-Werror=empty-body]
Quoted 6 lines
Quoted 5 lines
Changing the
GEM_BUG_ON()macro from an empty definition to "do { } while (0)" makes the macro more robust to use and avoids the warning.Fixes 3033acab07f9 ("drm/i915: Queue the idling context switch after all other timelines")Signed-off-by Arnd Bergmann <[email protected]>Reviewed-by Chris Wilson <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: avoid harmless empty-body warning
In reply to Arnd Bergmann== Series Details ==
== Series Details ==
Series: drm/i915: avoid harmless empty-body warning
URL : https://patchwork.freedesktop.org/series/14973/
State : failure
== Summary ==
Series 14973v1 drm/i915: avoid harmless empty-body warning
https://patchwork.freedesktop.org/api/1.0/series/14973/revisions/1/mbox/
Test drv_module_reload_basic:
dmesg-warn -> PASS (fi-skl-6770hq)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
pass -> INCOMPLETE (fi-snb-2600)fi-bdw-5557u total:244 pass:229 dwarn:0 dfail:0 fail:0 skip:15 fi-bsw-n3050 total:244 pass:204 dwarn:0 dfail:0 fail:0 skip:40 fi-bxt-t5700 total:244 pass:216 dwarn:0 dfail:0 fail:0 skip:28 fi-byt-j1900 total:244 pass:216 dwarn:0 dfail:0 fail:0 skip:28 fi-byt-n2820 total:244 pass:212 dwarn:0 dfail:0 fail:0 skip:32 fi-hsw-4770 total:244 pass:224 dwarn:0 dfail:0 fail:0 skip:20 fi-hsw-4770r total:244 pass:224 dwarn:0 dfail:0 fail:0 skip:20 fi-ilk-650 total:244 pass:191 dwarn:0 dfail:0 fail:0 skip:53 fi-ivb-3520m total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22 fi-ivb-3770 total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22 fi-kbl-7200u total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22 fi-skl-6260u total:244 pass:230 dwarn:0 dfail:0 fail:0 skip:14 fi-skl-6700hq total:244 pass:223 dwarn:0 dfail:0 fail:0 skip:21 fi-skl-6700k total:244 pass:222 dwarn:1 dfail:0 fail:0 skip:21 fi-skl-6770hq total:244 pass:230 dwarn:0 dfail:0 fail:0 skip:14 fi-snb-2520m total:244 pass:212 dwarn:0 dfail:0 fail:0 skip:32 fi-snb-2600 total:207 pass:178 dwarn:0 dfail:0 fail:0 skip:28
9435ffb9ffbfecfa5a429a46af96b1b3fda41d6c drm-intel-nightly: 2016y-11m-08d-13h-53m-48s UTC integration manifest 1d4fc60 drm/i915: avoid harmless empty-body warning
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_2932/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx