Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10855560rwl; Mon, 2 Jan 2023 09:13:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXtnEYGP+8Te25p4XqEyTe+KmFjfSNQ+J+ZoyfRiORxf0zIZZx+nbG+p7xkA4M8GptIZuI/Q X-Received: by 2002:a05:6a20:e613:b0:ad:aaac:d3fe with SMTP id my19-20020a056a20e61300b000adaaacd3femr42373431pzb.47.1672679596701; Mon, 02 Jan 2023 09:13:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672679596; cv=none; d=google.com; s=arc-20160816; b=BVMKfZ7p8RIPwbUSlpigIvQaQ4AXDLIq06jje22GBPm1vB7fmqx3AiMx9NPkoE06mm RU7JTCQXbuN5qy3/iCOlmM8yK0kkQ25kvlQ+DCXbBzckcyc67G/zm/mdtWdaCrbqmLi3 IQ7kcLjeMlF58vp0lETeWgLGVSYHfYdBJGTJcPqIqMOKXiL2v7k+i0lpzIMYeoONi3yN kAMC8XGjtbrPlNk4m6S1BHXIVF53BDLGoo/sXMFOlzIyGuZmk+jG2wAQ27F9i4GWyxx+ +he/Isq570zltsneCj1Ch/Dbw2k50PgixLJxCYFpWudyuCkpopx/+jwxFt5937RVBT4Y M6pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:to:from:subject :dkim-signature; bh=HPfRYT3zd9N4GOP3CQ19hB8PNP2Qwq5hcRL4trl2vmc=; b=fTfVDPfbp6kj+P3tuCA6PnocErxw12zcdd3pAIqncUsC1dgzXL+l16zwusapQ2p/yj 9Z4ETf5s0cVTxGB2gjW/MbUCzeRUxXfX1tWna+dBT8r+L8TZujj21MqdSDuPaky0kv5v qKFWXqopNhTDEXXLJJAEd9sr38EOyhPtchIr3va8HxRCRDDjBGErm7cfoDe6Nh1aTcCg xBEYzX7gai4rWth56wCn10Jf/ilweNnPe9iqRzsUpul9G905iFTgiVGKWl1eDj2KwtOh m+Zxl1m6YmPpgqSCFvbTpHo6KZJteSRHJQoTw6WbDXhji3kg+kZIDg4/7ImUz+k7Xf2y SUCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mc89q7BZ; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 21-20020a631855000000b00478cc0a100asi30586401pgy.673.2023.01.02.09.13.04; Mon, 02 Jan 2023 09:13:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mc89q7BZ; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232796AbjABRHx (ORCPT + 99 others); Mon, 2 Jan 2023 12:07:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236485AbjABRHv (ORCPT ); Mon, 2 Jan 2023 12:07:51 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 756D2BC09 for ; Mon, 2 Jan 2023 09:07:49 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3979DB80D0D for ; Mon, 2 Jan 2023 17:07:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D57C9C433EF for ; Mon, 2 Jan 2023 17:07:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672679267; bh=Czc27/R8QuGddTFQdY9wbQyJ9XqVCjHMxtOnOjEbXiQ=; h=Subject:From:To:Date:In-Reply-To:References:From; b=mc89q7BZFdbvcYEEuSCrb4bhwOCOPN9mxwlKLipw3Odhdxj9VYYa4bOCISsAGmSaB t1iM2GZxaIKec0kwDC3tJ9yOc/JllLhP3/mxcsDhQov582ObnZSoCjKvw9pEPjUAWs lSlBqYslPDzrbtYfrekxa7K5VB37PQbfgh39NMIoG7gopm3fNq711e5QLDcIS1hD0T UGpLz6fa7yuhABzait1zdnX6q/5kNBSxFTTF6DfE3aDOg0Sh6X+u9NvXUlm7GmQvdW 4nWhaFskS5sXsAbIVXGug6Z9BeZFMcw5u7X4f2sdwCYJwll4ok2TiooeJXy84A0sRs WkOPUvMGtxaaQ== Subject: [PATCH v1 22/25] SUNRPC: Eliminate unneeded variable From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Mon, 02 Jan 2023 12:07:45 -0500 Message-ID: <167267926581.112521.16946881347611603048.stgit@manet.1015granger.net> In-Reply-To: <167267753484.112521.4826748148788735127.stgit@manet.1015granger.net> References: <167267753484.112521.4826748148788735127.stgit@manet.1015granger.net> User-Agent: StGit/1.5.dev2+g9ce680a5 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Chuck Lever Clean up: Saving the RPC program number in two places is unnecessary. Signed-off-by: Chuck Lever --- net/sunrpc/svc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index e473c19b2f8d..3c1574f362fe 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -1232,7 +1232,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv) struct svc_serv *serv = rqstp->rq_server; struct svc_process_info process; __be32 *statp; - u32 prog, vers; + u32 vers; __be32 rpc_stat; int auth_res, rc; __be32 *reply_statp; @@ -1259,12 +1259,12 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv) svc_putnl(resv, 0); /* ACCEPT */ - rqstp->rq_prog = prog = svc_getnl(argv); /* program number */ + rqstp->rq_prog = svc_getnl(argv); /* program number */ rqstp->rq_vers = svc_getnl(argv); /* version number */ rqstp->rq_proc = svc_getnl(argv); /* procedure number */ for (progp = serv->sv_program; progp; progp = progp->pg_next) - if (prog == progp->pg_prog) + if (rqstp->rq_prog == progp->pg_prog) break; /* @@ -1389,7 +1389,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv) goto sendit; err_bad_prog: - dprintk("svc: unknown program %d\n", prog); + dprintk("svc: unknown program %d\n", rqstp->rq_prog); serv->sv_stats->rpcbadfmt++; svc_putnl(resv, RPC_PROG_UNAVAIL); goto sendit;