Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1517276
| From | Chris Wilson <chris@chris-wilson.co.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] drm/i915: avoid harmless empty-body warning |
| Date | 2016-11-08 16:10 +0100 |
| Message-ID | <sBgca-2wv-37@gated-at.bofh.it> (permalink) |
| References | <sBf6r-1Bm-43@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Nov 08, 2016 at 02:58:17PM +0100, Arnd Bergmann wrote:
> 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.
>
> Fixes: 3033acab07f9 ("drm/i915: Queue the idling context switch after all other timelines")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] drm/i915: avoid harmless empty-body warning Arnd Bergmann <arnd@arndb.de> - 2016-11-08 15:00 +0100
Re: [PATCH] drm/i915: avoid harmless empty-body warning Chris Wilson <chris@chris-wilson.co.uk> - 2016-11-08 16:10 +0100
Re: [Intel-gfx] [PATCH] drm/i915: avoid harmless empty-body warning Daniel Vetter <daniel@ffwll.ch> - 2016-11-08 17:40 +0100
csiph-web