From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753260AbcKHPGq (ORCPT ); Tue, 8 Nov 2016 10:06:46 -0500 Received: from mail.fireflyinternet.com ([109.228.58.192]:54447 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753157AbcKHPGo (ORCPT ); Tue, 8 Nov 2016 10:06:44 -0500 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Date: Tue, 8 Nov 2016 14:49:05 +0000 From: Chris Wilson To: Arnd Bergmann Cc: 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: [PATCH] drm/i915: avoid harmless empty-body warning Message-ID: <20161108144905.GC11395@nuc-i3427.alporthouse.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20161108135834.2166677-1-arnd@arndb.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -Chris -- Chris Wilson, Intel Open Source Technology Centre