Skip to contentSkip to conversation

coda: Remove redundant assignments to variable s

PATCH New Colin Ian King 1 participant 1 message Mar 17, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 coda: Remove redundant assignments to variable s

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;
---
 fs/coda/upcall.c | 2 --
 1 file changed, 2 deletions(-)
fs/coda/upcall.c +0 -2
index cd6a3721f6f6..1870a91eae86 100644
@@ -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';
 
Signature · 1 line
2.30.2