Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1949631ybz; Sat, 18 Apr 2020 11:58:16 -0700 (PDT) X-Google-Smtp-Source: APiQypJ9ioKKeBZrWBxfuP5iaAtzEBxjFerQvOHxA+BQpJN6ULYAdy47ujn+1zi7h9PFKu9iQQ6J X-Received: by 2002:a05:6402:1506:: with SMTP id f6mr8114862edw.217.1587236296134; Sat, 18 Apr 2020 11:58:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587236296; cv=none; d=google.com; s=arc-20160816; b=BtDOk8k6mzEM+QLWj1t14uKbf0fzTMmf+LJXIPdwXahueoRRaXXu+RPPM9vsQfQXo+ yhMSWFTsyQYIT6qPN5oGTN/uia0pCuURQWX1itcP6ZFBE5jme95TxANTxsN96ddAeqpZ hT7km8217HLDArm++ergaRa6mHPG2jJfyAZeZzPNhaJMGO6PNKmgwA90izBW95WVnUUX mKepci3gl8XsXsE/Rh2355DG7+UBneL8w/or9ixPz1TIcdu7KbORhQ7ETAV2GMQl12U/ s/1smUJODD7G29cauA3PKAtriMQvI3fCSykdF6e0YaP0kguSxD5/K4bNnsf+xlRkX783 Dn1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=v6goMSiM3JqD5eRdn45ZDeyVAxJCt3W7fqpeEGrJJtc=; b=zfKdQxefdXbo8/TDbMHGEGBCQVkxywKL/pgvHEGvrrt0Z02an87XyS8r3fxIPoceiz sWtGFv4Xb9GIgjhVCfIGyzy6vaY4mpQXQBmEDJ1b2e4cuWlQ4sddpQdgrEmH/VcXgjFA dYnUcWQWQosmXt+aBW9d7sGOTGuN3W/HT+mN+ELLDXkzfMMqTA7KSFDCsDFvif0mYCJk SaYxhO992PvWxRn562Z/ydJyzj/8+tHX2jjfWp62MhWnQlrjs2KFvlExEPrIRvXnDooZ cLHagZ20nJkesOBogMgOjLXvNUdT8ECnof3JZ27QxYd7nHwi/HkIdYdMu7h15EauQ5En Gh2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=KyiJJMam; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ce3si19395757edb.286.2020.04.18.11.57.53; Sat, 18 Apr 2020 11:58:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=KyiJJMam; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728177AbgDRS5e (ORCPT + 99 others); Sat, 18 Apr 2020 14:57:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726086AbgDRS5d (ORCPT ); Sat, 18 Apr 2020 14:57:33 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76398C061A0C; Sat, 18 Apr 2020 11:57:33 -0700 (PDT) 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=v6goMSiM3JqD5eRdn45ZDeyVAxJCt3W7fqpeEGrJJtc=; b=KyiJJMamxfOIjVFL72tLsYD7re sd31vDw2o9XAGj4cjlL0iY4LlaG6HfVp+RX/eAnF8cs7BFGA7rm1P50OIDl4CJaSxdZP9IFpIodWa qKFndBfM+66S0aonynhdQTK/wJPSVS1Y4GHEToI5QjfeKxEM5UcdrBqdzJ3gwI+cd+itnETKujVao no3xr+EdUuBl8Nn1gwFz9atcofq1XkfodTx5dSOb3avPvgI/1CgyqkUdIR/uY0+1yXAWS0ASg6Ion xZd3LmWJA+40BpAwWMUlGbYNQaWIgBlBDowZN86RmjMlnIBdG8kobJ5e86SBZIZs/svVAtt0wyDuC yjEBGuCw==; Received: from [2601:1c0:6280:3f0::19c2] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jPseh-0000VM-7j; Sat, 18 Apr 2020 18:57:31 +0000 Subject: Re: [PATCH 6/9] nfsd: fix empty-body warning in nfs4state.c To: Joe Perches , Chuck Lever Cc: LKML , Linus Torvalds , Andrew Morton , Al Viro , linux-fsdevel@vger.kernel.org, Dmitry Torokhov , linux-input@vger.kernel.org, Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, Greg Kroah-Hartman , linux-usb@vger.kernel.org, Bruce Fields , Linux NFS Mailing List , Johannes Berg , Dan Williams , Vishal Verma , Dave Jiang , linux-nvdimm@lists.01.org, "Martin K. Petersen" , linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, Zzy Wysm References: <20200418184111.13401-1-rdunlap@infradead.org> <20200418184111.13401-7-rdunlap@infradead.org> <6c796219ea79d87093409f2dd1d3bf8e4a157ed7.camel@perches.com> From: Randy Dunlap Message-ID: Date: Sat, 18 Apr 2020 11:57:28 -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: <6c796219ea79d87093409f2dd1d3bf8e4a157ed7.camel@perches.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 4/18/20 11:53 AM, Joe Perches 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(); >>> new->cl_minorversion = 0; >>> gen_callback(new, setclid, rqstp); >>> add_to_unconfirmed(new); > > This empty else seems silly and could likely be better handled by > a comment above the first if, something like: > > /* for now only handle case 1: probable callback update */ > if (conf && same_verf(&conf->cl_verifier, &clverifier)) { > copy_clid(new, conf); > gen_confirm(new, nn); > } > > with no else use. I'll just let Chuck handle it with his current patch, whatever it is. thanks. -- ~Randy