From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D772C2BA19 for ; Sat, 18 Apr 2020 22:33:13 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8987921973 for ; Sat, 18 Apr 2020 22:33:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="KBAnbqbx"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="loO7Qmrt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8987921973 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DED22846; Sun, 19 Apr 2020 00:32:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DED22846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1587249191; bh=TqqW7zvRUpzzu17/Rh6B1P9TrXoHQwTTJEm6DbNuDpw=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=KBAnbqbx7giEz8yC1AN1DFkMocKTv+wpE+xdWwKO8Qbhs/GyvXVp0TM+bQqX8ReHS D+noQLQWN2T4es4GCevbkKz3Dhkt3pY1/l6bifGxzF5wy4XsJ0yTvv9ra5x/7QyBFZ v9F1qQUOSP0l9/mHfTDCn44GVa7ifufraU10C+js= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7182AF8013D; Sun, 19 Apr 2020 00:32:20 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 51601F8014E; Sun, 19 Apr 2020 00:32:19 +0200 (CEST) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EF265F8012E for ; Sun, 19 Apr 2020 00:32:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EF265F8012E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="loO7Qmrt" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=zyG1QPS3RY2nWyGdHwcEoZL1dyrlEFupJ3Qi8VlAHRo=; b=loO7QmrtjVUfmmDDXVlI56bim3 vaQVMQJheKFM/fE/1PTtCTTNe5XzeE/U7X2nTTSIWa2jsTphcpKDjL38BHOFJmFjIERkw1AXdISWE voAskfcYnobN2Cg1+P9xUb2INjXTpWf5cHvlbdHJX8AvFR/Nh2KWcL+zidNsbp7aa5RWLcbm4tdBY Q0wqgJei4sy2H6/qPY4WvoBul6hgnZd/9ZU74LcYk0mKxiyoJ+abZZmI+6EKaHmhxW62rGd+bzcYi uN5aQpL4TxGWtDU3C4cNci1ZCHm1UWwy33ZzvpUBRGHVtwzMJ6QU7jRANEHTNyCknHb8PG26nUhi/ eFavfSdg==; Received: from [2601:1c0:6280:3f0::19c2] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jPw0Q-0000cZ-8H; Sat, 18 Apr 2020 22:32:10 +0000 Subject: Re: [PATCH 6/9] nfsd: fix empty-body warning in nfs4state.c To: Trond Myklebust , "chuck.lever@oracle.com" References: <20200418184111.13401-1-rdunlap@infradead.org> <20200418184111.13401-7-rdunlap@infradead.org> From: Randy Dunlap Message-ID: Date: Sat, 18 Apr 2020 15:32:05 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Cc: "alsa-devel@alsa-project.org" , "linux-usb@vger.kernel.org" , "zzy@zzywysm.com" , "linux-kernel@vger.kernel.org" , "bfields@fieldses.org" , "target-devel@vger.kernel.org" , "dave.jiang@intel.com" , "linux-scsi@vger.kernel.org" , "linux-nvdimm@lists.01.org" , "vishal.l.verma@intel.com" , "linux-input@vger.kernel.org" , "viro@zeniv.linux.org.uk" , "dan.j.williams@intel.com" , "johannes@sipsolutions.net" , "linux-nfs@vger.kernel.org" , "martin.petersen@oracle.com" , "gregkh@linuxfoundation.org" , "dmitry.torokhov@gmail.com" , "tiwai@suse.com" , "linux-fsdevel@vger.kernel.org" , "akpm@linux-foundation.org" , "torvalds@linux-foundation.org" X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On 4/18/20 3:28 PM, Trond Myklebust wrote: > On Sat, 2020-04-18 at 14:45 -0400, Chuck Lever wrote: >>> On Apr 18, 2020, at 2:41 PM, Randy Dunlap >>> wrote: >>> >>> Fix gcc empty-body warning when -Wextra is used: >>> >>> ../fs/nfsd/nfs4state.c:3898:3: warning: suggest braces around empty >>> body in an ‘else’ statement [-Wempty-body] >>> >>> Signed-off-by: Randy Dunlap >>> Cc: Linus Torvalds >>> Cc: Andrew Morton >>> Cc: "J. Bruce Fields" >>> Cc: Chuck Lever >>> Cc: linux-nfs@vger.kernel.org >> >> I have a patch in my queue that addresses this particular warning, >> but your change works for me too. >> >> Acked-by: Chuck Lever >> >> Unless Bruce objects. >> >> >>> --- >>> fs/nfsd/nfs4state.c | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> --- linux-next-20200417.orig/fs/nfsd/nfs4state.c >>> +++ linux-next-20200417/fs/nfsd/nfs4state.c >>> @@ -34,6 +34,7 @@ >>> >>> #include >>> #include >>> +#include >>> #include >>> #include >>> #include >>> @@ -3895,7 +3896,7 @@ nfsd4_setclientid(struct svc_rqst *rqstp >>> copy_clid(new, conf); >>> gen_confirm(new, nn); >>> } else /* case 4 (new client) or cases 2, 3 (client reboot): */ >>> - ; >>> + do_empty(); > > Urgh... This is just for documentation purposes anyway, so why not just > turn it all into a comment by moving the 'else' into the comment field? > > i.e. > } /* else case 4 (.... */ > > new->cl_minorversion = 0; >>> gen_callback(new, setclid, rqstp); >>> add_to_unconfirmed(new); Like I said earlier, since Chuck has a patch that addresses this, let's just go with that. thanks. -- ~Randy