linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] ext2: remove redundant assignment to pointer end
@ 2023-03-17 14:34 Colin Ian King
  2023-03-21 14:08 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2023-03-17 14:34 UTC (permalink / raw)
  To: Jan Kara, linux-ext4; +Cc: kernel-janitors, linux-kernel

Pointer is assigned a value that is never read, the assignment is
redundant and can be removed.

Cleans up clang-scan warning:
fs/ext2/xattr.c:555:3: warning: Value stored to 'end' is never read [deadcode.DeadStores]
                end = (char *)header + sb->s_blocksize;

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 fs/ext2/xattr.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c
index b126af5f8b15..8906ba479aaf 100644
--- a/fs/ext2/xattr.c
+++ b/fs/ext2/xattr.c
@@ -552,7 +552,6 @@ ext2_xattr_set(struct inode *inode, int name_index, const char *name,
 		error = -ENOMEM;
 		if (header == NULL)
 			goto cleanup;
-		end = (char *)header + sb->s_blocksize;
 		header->h_magic = cpu_to_le32(EXT2_XATTR_MAGIC);
 		header->h_blocks = header->h_refcount = cpu_to_le32(1);
 		last = here = ENTRY(header+1);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-21 14:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17 14:34 [PATCH][next] ext2: remove redundant assignment to pointer end Colin Ian King
2023-03-21 14:08 ` Jan Kara

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).