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 5/5][next] bcachefs: remove redundant pointer q
Date: Tue, 12 Sep 2023 13:37:44 +0100 [thread overview]
Message-ID: <20230912123744.3929609-6-colin.i.king@gmail.com> (raw)
In-Reply-To: <20230912123744.3929609-1-colin.i.king@gmail.com>
The pointer q is being assigned a value but it is never read. The
assignment and pointer are redundant and can be removed.
Cleans up clang scan build warning:
fs/bcachefs/quota.c:813:2: warning: Value stored to 'q' is never
read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
fs/bcachefs/quota.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/bcachefs/quota.c b/fs/bcachefs/quota.c
index ca99772aedc6..719c4c9fc51f 100644
--- a/fs/bcachefs/quota.c
+++ b/fs/bcachefs/quota.c
@@ -786,7 +786,6 @@ static int bch2_quota_set_info(struct super_block *sb, int type,
{
struct bch_fs *c = sb->s_fs_info;
struct bch_sb_field_quota *sb_quota;
- struct bch_memquota_type *q;
int ret = 0;
if (0) {
@@ -810,8 +809,6 @@ static int bch2_quota_set_info(struct super_block *sb, int type,
~(QC_SPC_TIMER|QC_INO_TIMER|QC_SPC_WARNS|QC_INO_WARNS))
return -EINVAL;
- q = &c->quotas[type];
-
mutex_lock(&c->sb_lock);
sb_quota = bch2_sb_get_or_create_quota(&c->disk_sb);
if (!sb_quota) {
--
2.39.2
next prev parent reply other threads:[~2023-09-12 12:38 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 ` [PATCH 1/5][next] bcachefs: remove redundant initialization of pointer d Colin Ian King
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 ` Colin Ian King [this message]
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-6-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox