Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2103180ybz; Sat, 18 Apr 2020 15:37:33 -0700 (PDT) X-Google-Smtp-Source: APiQypLmBUeOM+NN2hwiJtviVaT2ZUp6Fh2AIvsxn2GVHD+sWfiHZaelvdnpQH0aM9MnHa6uMGcD X-Received: by 2002:aa7:ce05:: with SMTP id d5mr7012023edv.120.1587249453451; Sat, 18 Apr 2020 15:37:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587249453; cv=none; d=google.com; s=arc-20160816; b=e01LVIXBHQS9UyPcuOvZIBSYj9adv73YuU4Ik7+3B7D4ry2lmCyf5rATu1RtQA7Pyk 4QyS5vLMqs9EKI/hruoFSGDc0g74UqTSM5xUFD14KNmLTGkKppbxo+QHd+t4WV4ejrR2 ytMKCN01IF7IsBgIwxKjOT4qaVQ2wH6O+Bw4MwTgAdVwpr46zvXLcqXon6kP2lVfHcrs 5ynDLBQBjNys+31U/GMQnN9t0zLeNrAZNyeC58oH396Gul0AJRNm5SGN58OT8xbeankr DMkm+tq2RS+NL9BDj55XFpxvXxdffNHZk69sLe2gqZtRZ0NcF+u/duA3yLvo0pdLuE9W M5Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=zK4gJmDAQjm6odpqw+dWgt3X8Z8VkPHJX9eb1aKLC5g=; b=pO/LLXoZe+CUxP3OCQAeqUvwnOwsJCLwlhSuZ0Nl8DDs0W3Gy0/O9UrTrOCEpbwKN7 iy8BRZ9XWGmFtFT6+nJQIKVa9/I3sbo/dwqDzpbUd61QadiwzBN05VdrcW+SMX8cw8AR Cmim9Eh72jYTia8eQZiDEEgFJTQ1L4p2/26XSn/6D/XqjOtxhDwno1vTrPijhxMHJLNk /Q4EP8R0XpIXcgtd293pw7fDib38/GFXIwhh/tm9K/yYx3Yv4872F+zd+jfHfE5231qA BoTMmOgRcQWfiTQ+Q6dXrio2qx69aPmr+nwKy7DGVpey/DAuFIhnp8/qG/klC3etAsp9 rwYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=x2TF6WJw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i17si17063066ejh.276.2020.04.18.15.37.09; Sat, 18 Apr 2020 15:37:33 -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=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=x2TF6WJw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726894AbgDRWhI (ORCPT + 99 others); Sat, 18 Apr 2020 18:37:08 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:36466 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726887AbgDRWhI (ORCPT ); Sat, 18 Apr 2020 18:37:08 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03IMWJax025251; Sat, 18 Apr 2020 22:35:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=corp-2020-01-29; bh=zK4gJmDAQjm6odpqw+dWgt3X8Z8VkPHJX9eb1aKLC5g=; b=x2TF6WJw26JFS9DnzG1jjX7fP7mK0Gmueyj0VEUPz5H83bvjFEEwlne4gN+tk9eBscUm 90ro37TBLrsx8aoPw+tGrpex6qPRAvhSHvbeBXswEwzL2kVQ3pz78kuJncF1HNoWMT2j QRoWUa/r0eaCnaztQlQ4n8h/igTGoktprS0Lj0IKrdFzvtpr1o3bwUEpjem5uQioamKj 82bJVWqQoP+zfd1SQ+rPmWEF1NJGwV8Sey/KtKrs2TWKmazxhP9idWtuAFq86C+upl5u lJ2ZrAZYW+xzqm4vONNeX03aSz20xUVcvYXQ9z+0XJHfCyxQGRNSSE1mtNbDXfldBK+t HA== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 30fsgkj1d6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 18 Apr 2020 22:35:49 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03IMXRJG022075; Sat, 18 Apr 2020 22:33:49 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 30fqkadq8j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 18 Apr 2020 22:33:49 +0000 Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 03IMXbL4005563; Sat, 18 Apr 2020 22:33:41 GMT Received: from anon-dhcp-153.1015granger.net (/68.61.232.219) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 18 Apr 2020 15:33:37 -0700 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [PATCH 6/9] nfsd: fix empty-body warning in nfs4state.c From: Chuck Lever In-Reply-To: Date: Sat, 18 Apr 2020 18:33:35 -0400 Cc: Trond Myklebust , "linux-nvdimm@lists.01.org" , "linux-usb@vger.kernel.org" , Bruce Fields , "linux-input@vger.kernel.org" , "torvalds@linux-foundation.org" , "zzy@zzywysm.com" , Andrew Morton , "linux-kernel@vger.kernel.org" , "johannes@sipsolutions.net" , "linux-scsi@vger.kernel.org" , "vishal.l.verma@intel.com" , Linux NFS Mailing List , "dmitry.torokhov@gmail.com" , Al Viro , "perex@perex.cz" , "dave.jiang@intel.com" , "tiwai@suse.com" , "target-devel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "gregkh@linuxfoundation.org" , "Martin K. Petersen" , "alsa-devel@alsa-project.org" , "dan.j.williams@intel.com" Content-Transfer-Encoding: quoted-printable Message-Id: References: <20200418184111.13401-1-rdunlap@infradead.org> <20200418184111.13401-7-rdunlap@infradead.org> To: Randy Dunlap X-Mailer: Apple Mail (2.3445.104.11) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9595 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 spamscore=0 mlxscore=0 malwarescore=0 phishscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004180188 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9595 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=999 malwarescore=0 clxscore=1015 spamscore=0 bulkscore=0 phishscore=0 suspectscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004180188 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org > On Apr 18, 2020, at 6:32 PM, Randy Dunlap = wrote: >=20 > 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: >>>>=20 >>>> Fix gcc empty-body warning when -Wextra is used: >>>>=20 >>>> ../fs/nfsd/nfs4state.c:3898:3: warning: suggest braces around empty >>>> body in an =E2=80=98else=E2=80=99 statement [-Wempty-body] >>>>=20 >>>> Signed-off-by: Randy Dunlap >>>> Cc: Linus Torvalds >>>> Cc: Andrew Morton >>>> Cc: "J. Bruce Fields" >>>> Cc: Chuck Lever >>>> Cc: linux-nfs@vger.kernel.org >>>=20 >>> I have a patch in my queue that addresses this particular warning, >>> but your change works for me too. >>>=20 >>> Acked-by: Chuck Lever >>>=20 >>> Unless Bruce objects. >>>=20 >>>=20 >>>> --- >>>> fs/nfsd/nfs4state.c | 3 ++- >>>> 1 file changed, 2 insertions(+), 1 deletion(-) >>>>=20 >>>> --- linux-next-20200417.orig/fs/nfsd/nfs4state.c >>>> +++ linux-next-20200417/fs/nfsd/nfs4state.c >>>> @@ -34,6 +34,7 @@ >>>>=20 >>>> #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(); >>=20 >> 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? >>=20 >> i.e. >> } /* else case 4 (.... */ >>=20 >> new->cl_minorversion =3D 0; >>>> gen_callback(new, setclid, rqstp); >>>> add_to_unconfirmed(new); >=20 > Like I said earlier, since Chuck has a patch that addresses this, > let's just go with that. I'll post that patch for review as part of my NFSD for-5.8 patches. -- Chuck Lever