From: Colin Ian King <colin.i.king@gmail.com>
To: "Darrick J . Wong" <djwong@kernel.org>,
Dave Chinner <dchinner@redhat.com>,
linux-xfs@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH][next] xfs: remove redundant initializations of pointers drop_leaf and save_leaf
Date: Thu, 22 Jun 2023 10:34:03 +0100 [thread overview]
Message-ID: <20230622093403.2829382-1-colin.i.king@gmail.com> (raw)
Pointers drop_leaf and save_leaf are initialized with values that are never
read, they are being re-assigned later on just before they are used. Remove
the redundant early initializations and keep the later assignments at the
point where they are used. Cleans up two clang scan build warnings:
fs/xfs/libxfs/xfs_attr_leaf.c:2288:29: warning: Value stored to 'drop_leaf'
during its initialization is never read [deadcode.DeadStores]
fs/xfs/libxfs/xfs_attr_leaf.c:2289:29: warning: Value stored to 'save_leaf'
during its initialization is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
fs/xfs/libxfs/xfs_attr_leaf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_attr_leaf.c b/fs/xfs/libxfs/xfs_attr_leaf.c
index beee51ad75ce..3091d40a1eb6 100644
--- a/fs/xfs/libxfs/xfs_attr_leaf.c
+++ b/fs/xfs/libxfs/xfs_attr_leaf.c
@@ -2285,8 +2285,8 @@ xfs_attr3_leaf_unbalance(
struct xfs_da_state_blk *drop_blk,
struct xfs_da_state_blk *save_blk)
{
- struct xfs_attr_leafblock *drop_leaf = drop_blk->bp->b_addr;
- struct xfs_attr_leafblock *save_leaf = save_blk->bp->b_addr;
+ struct xfs_attr_leafblock *drop_leaf;
+ struct xfs_attr_leafblock *save_leaf;
struct xfs_attr3_icleaf_hdr drophdr;
struct xfs_attr3_icleaf_hdr savehdr;
struct xfs_attr_leaf_entry *entry;
--
2.39.2
next reply other threads:[~2023-06-22 9:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-22 9:34 Colin Ian King [this message]
2023-06-28 17:53 ` Darrick J. Wong
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=20230622093403.2829382-1-colin.i.king@gmail.com \
--to=colin.i.king@gmail.com \
--cc=dchinner@redhat.com \
--cc=djwong@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@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®