From: Colin Ian King <colin.i.king@gmail.com>
To: Kent Overstreet <kent.overstreet@linux.dev>,
Brian Foster <bfoster@redhat.com>,
linux-bcachefs@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/5][next] bcachefs: remove redundant initialization of pointer d
Date: Tue, 12 Sep 2023 13:37:40 +0100 [thread overview]
Message-ID: <20230912123744.3929609-2-colin.i.king@gmail.com> (raw)
In-Reply-To: <20230912123744.3929609-1-colin.i.king@gmail.com>
The pointer d is being initialized with a value that is never read,
it is being re-assigned later on when it is used in a for-loop.
The initialization is redundant and can be removed.
Cleans up clang-scan build warning:
fs/bcachefs/buckets.c:1303:25: warning: Value stored to 'd' during its
initialization is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
fs/bcachefs/btree_update_interior.c | 2 +-
fs/bcachefs/buckets.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/bcachefs/btree_update_interior.c b/fs/bcachefs/btree_update_interior.c
index 73c950d2788e..35f7af297ac0 100644
--- a/fs/bcachefs/btree_update_interior.c
+++ b/fs/bcachefs/btree_update_interior.c
@@ -143,7 +143,7 @@ static size_t btree_node_u64s_with_format(struct btree *b,
}
/**
- * btree_node_format_fits - check if we could rewrite node with a new format
+ * bch2_btree_node_format_fits - check if we could rewrite node with a new format
*
* This assumes all keys can pack with the new format -- it just checks if
* the re-packed keys would fit inside the node itself.
diff --git a/fs/bcachefs/buckets.c b/fs/bcachefs/buckets.c
index c02c8c917a29..951f945bbc22 100644
--- a/fs/bcachefs/buckets.c
+++ b/fs/bcachefs/buckets.c
@@ -1300,7 +1300,7 @@ int bch2_trans_fs_usage_apply(struct btree_trans *trans,
static int warned_disk_usage = 0;
bool warn = false;
unsigned disk_res_sectors = trans->disk_res ? trans->disk_res->sectors : 0;
- struct replicas_delta *d = deltas->d, *d2;
+ struct replicas_delta *d, *d2;
struct replicas_delta *top = (void *) deltas->d + deltas->used;
struct bch_fs_usage *dst;
s64 added = 0, should_not_have_added;
--
2.39.2
next prev parent reply other threads:[~2023-09-12 12:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 12:37 [PATCH 0/5][next] bcachefs: clean up some redundant assignments Colin Ian King
2023-09-12 12:37 ` Colin Ian King [this message]
2023-09-12 12:37 ` [PATCH 2/5][next] bcachefs: remove redundant initialization of pointer dst Colin Ian King
2023-09-12 13:52 ` Brian Foster
2023-09-12 12:37 ` [PATCH 3/5][next] bcachefs: remove redundant initializations of variables start_offset and end_offset Colin Ian King
2023-09-12 12:37 ` [PATCH 4/5][next] bcachefs: remove duplicated assignment to variable offset_into_extent Colin Ian King
2023-09-12 12:37 ` [PATCH 5/5][next] bcachefs: remove redundant pointer q Colin Ian King
2023-09-12 13:52 ` [PATCH 0/5][next] bcachefs: clean up some redundant assignments Brian Foster
2023-09-12 16:27 ` Kent Overstreet
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=20230912123744.3929609-2-colin.i.king@gmail.com \
--to=colin.i.king@gmail.com \
--cc=bfoster@redhat.com \
--cc=kent.overstreet@linux.dev \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-bcachefs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.