[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230912123744.3929609-4-colin.i.king@gmail.com>
Date: Tue, 12 Sep 2023 13:37:42 +0100
From: Colin Ian King <colin.i.king@...il.com>
To: Kent Overstreet <kent.overstreet@...ux.dev>,
Brian Foster <bfoster@...hat.com>,
linux-bcachefs@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 3/5][next] bcachefs: remove redundant initializations of variables start_offset and end_offset
The variables start_offset and end_offset are being initialized with
values that are never read, they being re-assigned later on. The
initializations are redundant and can be removed.
Cleans up clang-scan build warnings:
fs/bcachefs/fs-io.c:243:11: warning: Value stored to 'start_offset' during
its initialization is never read [deadcode.DeadStores]
fs/bcachefs/fs-io.c:244:11: warning: Value stored to 'end_offset' during
its initialization is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@...il.com>
---
fs/bcachefs/fs-io.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c
index ceab12fb8a8f..c108335e0502 100644
--- a/fs/bcachefs/fs-io.c
+++ b/fs/bcachefs/fs-io.c
@@ -240,8 +240,8 @@ static int __bch2_truncate_folio(struct bch_inode_info *inode,
struct bch_fs *c = inode->v.i_sb->s_fs_info;
struct address_space *mapping = inode->v.i_mapping;
struct bch_folio *s;
- unsigned start_offset = start & (PAGE_SIZE - 1);
- unsigned end_offset = ((end - 1) & (PAGE_SIZE - 1)) + 1;
+ unsigned start_offset;
+ unsigned end_offset;
unsigned i;
struct folio *folio;
s64 i_sectors_delta = 0;
--
2.39.2
Powered by blists - more mailing lists