Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3946259rwb; Mon, 5 Sep 2022 23:14:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR5XhuJ7cHtgy9IXhyrT6nm208/U3IwGED/kpF2OgBfOh4eQ7AcXGvEVsnRuPR8HVvKqlF5c X-Received: by 2002:a63:9d0c:0:b0:42b:6821:bbb2 with SMTP id i12-20020a639d0c000000b0042b6821bbb2mr45876359pgd.299.1662444867090; Mon, 05 Sep 2022 23:14:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662444867; cv=none; d=google.com; s=arc-20160816; b=aRW3xbN7nYOIyeHuCCW0Ml+dwolzgcS1Q5bkRJnJ69ii7bV+LDnu1z1Uda48anQ1R4 xvCK2Scr4Daih4+cYmbhVNJpTIZxNcEG7gd+vY1i3HYH3ntFBQuC9zInrZK7aXAjeHj9 yyzeIc8RkKWLhnFgB1WJLtdTFkIuuk85PYK+fh56XOBQzfhzzSooKnSrIADCT5jU/86M 0GJFBc14yiYC/3g6pmPBuD9N3BQhi1Y3joqqx+H7R8c/jXvCaAC+1iqPkiDxAPH0hb2c LAIdJ8YEdjUV2uYDcKuPDdNn1qZRPRfG8nF86nCCoT+c8aTnyjXzzZSlsJC5XpUV0/o0 hhdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:abuse-reports-to:tuid:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=BDLMnHSLvZXZD/cEHcBHS2bTnMrYDPzd99bOpb8b5gw=; b=NYZf3vs8wp9phjkE1V1cxSh0iFgcEeuAqMYTCDeDBgBFGcqzGbp+mx4EKtyy2oIZpv 8dP/BySk49AvRmutcdGDoyMWOkz2dU/B/qSocCrfD6JALtM/T57DFaXG/ag8T9xEplVY hRP9krBZg2RyVf1S/FunolTMODDHZIBX7mSw/5DrK+TsmzkSUB0ZCm87Y+5JdfKAPVxJ zY/meSwBqZwJ1N5kn1NZ5I2R55azeKL6aF9evg9Mef7M7wr9E8lG9UqK/ytTQ2AF6eW3 aLZ3jWr8wSPkIFEWUyNExn2ge0UcKun3DOkGm7/UyxD5mCIHmL1S8TZdmvl3hnMXf7ZW 1saA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k2-20020a170902c40200b0016781796321si13630247plk.49.2022.09.05.23.14.15; Mon, 05 Sep 2022 23:14:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232949AbiIFFtm (ORCPT + 99 others); Tue, 6 Sep 2022 01:49:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232570AbiIFFtk (ORCPT ); Tue, 6 Sep 2022 01:49:40 -0400 Received: from unicom146.biz-email.net (unicom146.biz-email.net [210.51.26.146]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DB721A066; Mon, 5 Sep 2022 22:49:37 -0700 (PDT) Received: from ([60.208.111.195]) by unicom146.biz-email.net ((D)) with ASMTP (SSL) id AED00132; Tue, 06 Sep 2022 13:49:32 +0800 Received: from localhost.localdomain (10.200.104.82) by jtjnmail201619.home.langchao.com (10.100.2.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Tue, 6 Sep 2022 13:49:33 +0800 From: Deming Wang To: , , CC: , , , Deming Wang Subject: [PATCH] virtiofs: Drop unnecessary initialization in send_forget_request and virtio_fs_get_tree Date: Tue, 6 Sep 2022 01:38:48 -0400 Message-ID: <20220906053848.2503-1-wangdeming@inspur.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.200.104.82] X-ClientProxiedBy: Jtjnmail201614.home.langchao.com (10.100.2.14) To jtjnmail201619.home.langchao.com (10.100.2.19) tUid: 2022906134932b38d0b2abf1131d443f55694c3b78f63 X-Abuse-Reports-To: service@corp-email.com Abuse-Reports-To: service@corp-email.com X-Complaints-To: service@corp-email.com X-Report-Abuse-To: service@corp-email.com X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org The variable is initialized but it is only used after its assignment. Signed-off-by: Deming Wang --- fs/fuse/virtio_fs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c index 4d8d4f16c..bffe74d44 100644 --- a/fs/fuse/virtio_fs.c +++ b/fs/fuse/virtio_fs.c @@ -414,7 +414,7 @@ static int send_forget_request(struct virtio_fs_vq *fsvq, { struct scatterlist sg; struct virtqueue *vq; - int ret = 0; + int ret; bool notify; struct virtio_fs_forget_req *req = &forget->req; @@ -1414,10 +1414,10 @@ static int virtio_fs_get_tree(struct fs_context *fsc) { struct virtio_fs *fs; struct super_block *sb; - struct fuse_conn *fc = NULL; + struct fuse_conn *fc; struct fuse_mount *fm; unsigned int virtqueue_size; - int err = -EIO; + int err; /* This gets a reference on virtio_fs object. This ptr gets installed * in fc->iq->priv. Once fuse_conn is going away, it calls ->put() -- 2.27.0