From patchwork Fri Oct 13 06:39:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: KaiLong Wang X-Patchwork-Id: 152337 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp1700302vqb; Thu, 12 Oct 2023 23:41:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFJHYQA8pExhyk1QgL51sfsrXEvC8iwCQivT63Dk40wBUyvAxrzALU2ndTFVgf0fFbMPg5Z X-Received: by 2002:a05:6830:490e:b0:6c4:7516:f2cf with SMTP id eq14-20020a056830490e00b006c47516f2cfmr31985704otb.2.1697179302169; Thu, 12 Oct 2023 23:41:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697179302; cv=none; d=google.com; s=arc-20160816; b=cDdO804CHu9nYAQEX06MBsWNvH9f9AWg3YmwNoIUKwSHq0F/0OmSKv7Xi5DHo8lovS VVQvRuLMNXAdeJLgtekc3DUiDXFfnp+dI7TnC0LNLc3+hmQBN9ZXKm/mgBn/bq6axH3A zBwQtD1xm2va1A/WdpY42zsMytOspMmIPl8QAp7iApDUBn2Ln75HLhsbW8bT6zwdFP7Z NKiHzaQUjhYtM02qzYxbz4SxFsAuKDnpKW/VGvsotJo7vbxg0+GSNkfZoThkb10ifFDq oz642xMx4M02DSLlOB1cUOSrlyHSULkSzEoGxyX0EaSPbBdkmt8fyN7a2NA/KDSNCZ+V umLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:mime-version :content-transfer-encoding:subject:cc:to:from:date; bh=mbtgrPsN2qJes0veCSXkibG5gR4EtX3h4EKomvXYUJ0=; fh=9l6d3OX0zErKvIfdXvQxMGLHy57xGHrBOfDTq7NONIo=; b=NpAan+kE/flnOeuDOXruhm0WCBaFBNVCZQk30sG0xkDbGTbdkHLatiJhMFiNvu/giS 4D1+ammHwxteOUjYmJ7yumsrMmPa4x80pi8Vde4RI6IoqlFF8nmXSdekjGlZtqBSyeEA XmG+nIMo5/18xwJZQD7y515C0gAnxk30Gq3AtUUPulhBQT8YqKE4RoyHX3JcKl1kdsMl LmhZbUX9jHUdA8X7L7+E51DTjAt60xqR+RbnrmEXdl8baFt2ShXsOXo4lrQ+vn4B7+/x OeB0DGvBATge3UP2Wu+rRvhRbGSB/L9LK8PKZc14DzqlilaJ6Pr1OjUs3uU1PxZGJLAn Rjnw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id m125-20020a633f83000000b00577f87e6210si1014370pga.332.2023.10.12.23.41.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 23:41:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 73CDF8270070; Thu, 12 Oct 2023 23:41:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229743AbjJMGlk (ORCPT + 19 others); Fri, 13 Oct 2023 02:41:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbjJMGli (ORCPT ); Fri, 13 Oct 2023 02:41:38 -0400 Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DED05BC; Thu, 12 Oct 2023 23:41:36 -0700 (PDT) Received: from wangkailong$jari.cn ( [182.148.14.172] ) by ajax-webmail-localhost.localdomain (Coremail) ; Fri, 13 Oct 2023 14:39:51 +0800 (GMT+08:00) X-Originating-IP: [182.148.14.172] Date: Fri, 13 Oct 2023 14:39:51 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: "KaiLong Wang" To: chuck.lever@oracle.com, jlayton@kernel.org, neilb@suse.de, kolga@netapp.com, Dai.Ngo@oracle.com, tom@talpey.com Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] NFSD: Clean up errors in nfs4xdr.c X-Priority: 3 X-Mailer: Coremail Webmail Server Version 2023.1-cmXT6 build 20230419(ff23bf83) Copyright (c) 2002-2023 www.mailtech.cn mispb-4e503810-ca60-4ec8-a188-7102c18937cf-zhkzyfz.cn MIME-Version: 1.0 Message-ID: <116353ed.95a.18b27c347d9.Coremail.wangkailong@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwD3lD835ihlId7BAA--.750W X-CM-SenderInfo: 5zdqwypdlo00nj6mt2flof0/1tbiAQABB2UlHDMAlgAEs6 X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= X-Spam-Status: No, score=3.4 required=5.0 tests=BAYES_00,RCVD_IN_PBL,RDNS_NONE, T_SPF_HELO_PERMERROR,T_SPF_PERMERROR,XPRIO autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 12 Oct 2023 23:41:41 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779621484061013936 X-GMAIL-MSGID: 1779621484061013936 Fix the following errors reported by checkpatch: ERROR: spaces required around that '=' (ctx:VxV) ERROR: else should follow close brace '}' Signed-off-by: KaiLong Wang --- fs/nfsd/nfs4xdr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 1cbd2a392302..8b9707957649 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -2432,7 +2432,7 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp) { struct nfsd4_op *op; bool cachethis = false; - int auth_slack= argp->rqstp->rq_auth_slack; + int auth_slack = argp->rqstp->rq_auth_slack; int max_reply = auth_slack + 8; /* opcnt, status */ int readcount = 0; int readbytes = 0; @@ -2585,7 +2585,7 @@ static __be32 nfsd4_encode_components_esc(struct xdr_stream *xdr, char sep, __be32 *p; __be32 pathlen; int pathlen_offset; - int strlen, count=0; + int strlen, count = 0; char *str, *end, *next; dprintk("nfsd4_encode_components(%s)\n", components); @@ -2622,8 +2622,7 @@ static __be32 nfsd4_encode_components_esc(struct xdr_stream *xdr, char sep, return nfserr_resource; p = xdr_encode_opaque(p, str, strlen); count++; - } - else + } else end++; if (found_esc) end = next;