From: Deming Wang <wangdeming@inspur.com>
To: <vgoyal@redhat.com>, <stefanha@redhat.com>, <miklos@szeredi.hu>
Cc: <virtualization@lists.linux-foundation.org>,
<linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Deming Wang <wangdeming@inspur.com>
Subject: [PATCH] virtiofs: Drop unnecessary initialization in send_forget_request and virtio_fs_get_tree
Date: Tue, 6 Sep 2022 01:38:48 -0400 [thread overview]
Message-ID: <20220906053848.2503-1-wangdeming@inspur.com> (raw)
The variable is initialized but it is only used after its assignment.
Signed-off-by: Deming Wang <wangdeming@inspur.com>
---
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
next reply other threads:[~2022-09-06 5:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 5:38 Deming Wang [this message]
2022-09-06 10:10 ` [PATCH] virtiofs: Drop unnecessary initialization in send_forget_request and virtio_fs_get_tree kernel test robot
2022-09-06 13:30 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220906053848.2503-1-wangdeming@inspur.com \
--to=wangdeming@inspur.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=stefanha@redhat.com \
--cc=vgoyal@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).