Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753952AbcKHQfy (ORCPT ); Tue, 8 Nov 2016 11:35:54 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35546 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753898AbcKHQfw (ORCPT ); Tue, 8 Nov 2016 11:35:52 -0500 Date: Tue, 8 Nov 2016 17:35:43 +0100 From: Daniel Vetter To: Chris Wilson , Arnd Bergmann , Daniel Vetter , Jani Nikula , David Airlie , Joonas Lahtinen , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [Intel-gfx] [PATCH] drm/i915: avoid harmless empty-body warning Message-ID: <20161108163543.lnxabbla6oi6kouh@phenom.ffwll.local> Mail-Followup-To: Chris Wilson , Arnd Bergmann , Daniel Vetter , Jani Nikula , David Airlie , Joonas Lahtinen , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20161108135834.2166677-1-arnd@arndb.de> <20161108144905.GC11395@nuc-i3427.alporthouse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20161108144905.GC11395@nuc-i3427.alporthouse.com> X-Operating-System: Linux phenom 4.6.0-1-amd64 User-Agent: NeoMutt/20161014 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 934 Lines: 21 On Tue, Nov 08, 2016 at 02:49:05PM +0000, Chris Wilson wrote: > 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 > Reviewed-by: Chris Wilson Queued for -next, thanks for the patch. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch