From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932409AbdEROjm (ORCPT ); Thu, 18 May 2017 10:39:42 -0400 Received: from mx2.suse.de ([195.135.220.15]:50591 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756550AbdEROjf (ORCPT ); Thu, 18 May 2017 10:39:35 -0400 Date: Thu, 18 May 2017 16:39:33 +0200 Message-ID: From: Takashi Iwai To: "Arnd Bergmann" Cc: , "Jaroslav Kysela" , Subject: Re: [PATCH 1/2] ALSA: pcm: use "do {} while (0)" for empty macro In-Reply-To: <20170518133610.1914235-1-arnd@arndb.de> References: <20170518133610.1914235-1-arnd@arndb.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.2 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 18 May 2017 15:35:54 +0200, Arnd Bergmann wrote: > > Recent compilers produce a harmless warning for the new pcm_call_notify() > macro when CONFIG_SND_PCM_OSS is disabled: > > sound/core/pcm.c: In function 'snd_pcm_free': > sound/core/pcm.c:905:37: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] > > This turns the empty macro into a 'do {} while (0)' statement to avoid > the warning. > > Fixes: 58f30d650c7f ("ALSA: pcm: Build pcm notifier code conditionally") > Signed-off-by: Arnd Bergmann Thanks, applied both patches now. Takashi > --- > sound/core/pcm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/core/pcm.c b/sound/core/pcm.c > index 24acbfb5c531..d30dba0ee688 100644 > --- a/sound/core/pcm.c > +++ b/sound/core/pcm.c > @@ -894,7 +894,7 @@ static void snd_pcm_free_stream(struct snd_pcm_str * pstr) > _notify->call(pcm); \ > } while (0) > #else > -#define pcm_call_notify(pcm, call) /* NOP */ > +#define pcm_call_notify(pcm, call) do {} while (0) > #endif > > static int snd_pcm_free(struct snd_pcm *pcm) > -- > 2.9.0 > >