From: cgel.zte@gmail.com
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
luo penghao <luo.penghao@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: [PATCH v2] loop: Remove duplicate assignments
Date: Thu, 4 Nov 2021 06:45:46 +0000 [thread overview]
Message-ID: <20211104064546.3074-1-luo.penghao@zte.com.cn> (raw)
From: luo penghao <luo.penghao@zte.com.cn>
The assignment and operation there will be overwritten later, so
it should be deleted.
The clang_analyzer complains as follows:
drivers/block/loop.c:2330:2 warning:
Value stored to 'err' is never read
change in v2:
Repair the sending email box
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
---
drivers/block/loop.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 1f91bd4..941b482 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -2329,7 +2329,6 @@ static int loop_add(int i)
goto out_free_dev;
i = err;
- err = -ENOMEM;
lo->tag_set.ops = &loop_mq_ops;
lo->tag_set.nr_hw_queues = 1;
lo->tag_set.queue_depth = 128;
--
2.15.2
next reply other threads:[~2021-11-04 6:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-04 6:45 cgel.zte [this message]
2021-11-04 11:48 ` [PATCH v2] loop: Remove duplicate assignments Jens Axboe
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=20211104064546.3074-1-luo.penghao@zte.com.cn \
--to=cgel.zte@gmail.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luo.penghao@zte.com.cn \
--cc=zealci@zte.com.cn \
/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).