From: Colin Ian King <colin.i.king@gmail.com>
To: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH][next] hpfs: remove redundant variable r
Date: Tue, 16 Jan 2024 18:09:46 +0000 [thread overview]
Message-ID: <20240116180946.2321779-1-colin.i.king@gmail.com> (raw)
The variable r is being assigned a value but it isn't being read
afterwards. The assignment is redundant and so r can be removed.
Cleans up clang scan build warning:
warning: Although the value stored to 'r' is used in the enclosing
expression, the value is never actually read from 'r'
[deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
fs/hpfs/namei.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c
index 9184b4584b01..9b546ec6e614 100644
--- a/fs/hpfs/namei.c
+++ b/fs/hpfs/namei.c
@@ -547,8 +547,7 @@ static int hpfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
de.hidden = new_name[0] == '.';
if (new_inode) {
- int r;
- if ((r = hpfs_remove_dirent(old_dir, dno, dep, &qbh, 1)) != 2) {
+ if (hpfs_remove_dirent(old_dir, dno, dep, &qbh, 1) != 2) {
if ((nde = map_dirent(new_dir, hpfs_i(new_dir)->i_dno, new_name, new_len, NULL, &qbh1))) {
clear_nlink(new_inode);
copy_de(nde, &de);
--
2.39.2
next reply other threads:[~2024-01-16 18:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-16 18:09 Colin Ian King [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-06-21 14:00 [PATCH][next] hpfs: remove redundant variable r Colin Ian King
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=20240116180946.2321779-1-colin.i.king@gmail.com \
--to=colin.i.king@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikulas@artax.karlin.mff.cuni.cz \
/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