Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2100005ybz; Sat, 18 Apr 2020 15:32:43 -0700 (PDT) X-Google-Smtp-Source: APiQypJtkFC5MYsoOuMIshP49YwGY5mprTSYC74VEo3saQ9PNYaD1yxuUnwJBrheN2tQEUChgN+i X-Received: by 2002:a17:907:6fc:: with SMTP id yh28mr9750737ejb.326.1587249163678; Sat, 18 Apr 2020 15:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587249163; cv=none; d=google.com; s=arc-20160816; b=jJWTSWiRFFhaD0PIfHO4ExVm6mjos7UgSvCpQFyFyQGz1BLue6PRhXE0DQVMAnL0qf OIWp8yDNEapevh0ZlaJym5ALYUscQePZhYO+oaZQ5KGvKbho3251LTRNdKP24/MFPsAv oUxeqo35YX325s83xYtpTWEIrDuUS6yx7JBlISBpqJzunqyDO1MrH0gV01s+B2Pcq1zo rJLegH6Ih7OV178jkcvCIbNn37AyjAa+MTx9FTcTgWYmNkgvn02jne70xmTYpXZ1At1H geYPnuxHROtTefIZUTIUSDZp6hTOZMoCx7RD3G0DuzJF0GPbUTG+kAPQxcUOAmJT4F9u tfiw== 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=zyG1QPS3RY2nWyGdHwcEoZL1dyrlEFupJ3Qi8VlAHRo=; b=KJxrWPmGLKHLp3lSxSoGgZOXqGjYGSi42JYdizoQ0mLCW+StJFyfAuAZtl+XjuOsTr WC21eXhdcz4ks+N2NRGSwZjog/LrgEYA4kGmArGYnIKaDxveXz3o1tII64EjxI2RqpWI PRpAMbBHonJASXdm5O7kplR0Wlq46J6Xxgfv45iBjUQr3RH7ANrWBmNj2h1TqyFq2paX H6hLl8AJ0fW0OnQ4OZB2WMGl3qxDarldWQRwk60qDbbnLb46xRWffD5ZFlqkgvDu4mmS LqE6UGGZ5GYFZ7lW2TzeCnmyONdRL8ZlXKAEuYsHSbtaCc3lMa+WBdOg20UJyPj5Gcd2 yH7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=loO7Qmrt; 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 m21si16177745ejd.5.2020.04.18.15.32.19; Sat, 18 Apr 2020 15:32:43 -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=loO7Qmrt; 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 S1728259AbgDRWcP (ORCPT + 99 others); Sat, 18 Apr 2020 18:32:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726887AbgDRWcO (ORCPT ); Sat, 18 Apr 2020 18:32:14 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A952C061A0C; Sat, 18 Apr 2020 15:32:14 -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=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" Cc: "linux-nvdimm@lists.01.org" , "linux-usb@vger.kernel.org" , "bfields@fieldses.org" , "linux-input@vger.kernel.org" , "torvalds@linux-foundation.org" , "zzy@zzywysm.com" , "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "johannes@sipsolutions.net" , "linux-scsi@vger.kernel.org" , "vishal.l.verma@intel.com" , "linux-nfs@vger.kernel.org" , "dmitry.torokhov@gmail.com" , "viro@zeniv.linux.org.uk" , "perex@perex.cz" , "dave.jiang@intel.com" , "tiwai@suse.com" , "target-devel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "gregkh@linuxfoundation.org" , "martin.petersen@oracle.com" , "alsa-devel@alsa-project.org" , "dan.j.williams@intel.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 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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