From: Colin Ian King <colin.i.king@gmail.com>
To: coda@cs.cmu.edu, codalist@coda.cs.cmu.edu
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH][next] coda: Remove redundant assignments to variable s
Date: Fri, 17 Mar 2023 16:03:45 +0000 [thread overview]
Message-ID: <20230317160345.421230-1-colin.i.king@gmail.com> (raw)
Variable s is being assigned values and it is not being read afterwards.
The assignments are redundant and can be removed.
Cleans up 2 clang-scan warnings:
fs/coda/upcall.c:259:9: warning: Value stored to 's' is never read [deadcode.DeadStores]
s = ( new_length & ~0x3) +4; /* round up to word boundary */
fs/coda/upcall.c:430:9: warning: Value stored to 's' is never read [deadcode.DeadStores]
s = (len & ~0x3) + 4;
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
fs/coda/upcall.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c
index cd6a3721f6f6..1870a91eae86 100644
--- a/fs/coda/upcall.c
+++ b/fs/coda/upcall.c
@@ -256,7 +256,6 @@ int venus_rename(struct super_block *sb, struct CodaFid *old_fid,
/* another null terminated string for Venus */
offset += s;
inp->coda_rename.destname = offset;
- s = ( new_length & ~0x3) +4; /* round up to word boundary */
memcpy((char *)(inp) + offset, new_name, new_length);
*((char *)inp + offset + new_length) = '\0';
@@ -427,7 +426,6 @@ int venus_symlink(struct super_block *sb, struct CodaFid *fid,
/* Round up to word boundary and null terminate */
offset += s;
inp->coda_symlink.tname = offset;
- s = (len & ~0x3) + 4;
memcpy((char *)(inp) + offset, name, len);
*((char *)inp + offset + len) = '\0';
--
2.30.2
reply other threads:[~2023-03-17 16:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230317160345.421230-1-colin.i.king@gmail.com \
--to=colin.i.king@gmail.com \
--cc=coda@cs.cmu.edu \
--cc=codalist@coda.cs.cmu.edu \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®