From: Colin Ian King <colin.i.king@gmail.com>
To: Jan Kara <jack@suse.com>, linux-ext4@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH][next] ext2: remove redundant assignment to pointer end
Date: Fri, 17 Mar 2023 14:34:20 +0000 [thread overview]
Message-ID: <20230317143420.419005-1-colin.i.king@gmail.com> (raw)
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
next reply other threads:[~2023-03-17 14:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 14:34 Colin Ian King [this message]
2023-03-21 14:08 ` [PATCH][next] ext2: remove redundant assignment to pointer end Jan Kara
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=20230317143420.419005-1-colin.i.king@gmail.com \
--to=colin.i.king@gmail.com \
--cc=jack@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-ext4@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