Remove two unused parameters
cover Remove two unused parameters
This series simply removes two unused parameters.
Alan Huang (2):
bcachefs: Remove unused parameter of bkey_mantissa
bcachefs: Remove unused parameter of bkey_mantissa_bits_dropped
fs/bcachefs/bset.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
Signature · 1 line
2.45.2
PATCH 1/2 bcachefs: Remove unused parameter of bkey_mantissa
The idx parameter of bkey_mantissa became unused since commit b904a7991802 ("bcachefs: Go back to 16 bit mantissa bkey floats"), so remove it.
Signed-off-by Alan Huang <[email protected]>
--- fs/bcachefs/bset.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
fs/bcachefs/bset.c +3 -4
@@ -585,8 +585,7 @@ static unsigned rw_aux_tree_bsearch(struct btree *b, }static inline unsigned bkey_mantissa (const struct bkey_packed *k, -const struct bkey_float *f, -unsigned idx) +const struct bkey_float *f) {u64 v;
@@ -668,7 +667,7 @@ static __always_inline void make_bfloat(struct btree *b, struct bset_tree *t,EBUG_ON (shift <0 || shift >=BFLOAT_FAILED ); f->exponent = shift; - mantissa =bkey_mantissa (m, f, j); + mantissa =bkey_mantissa (m, f);/* * If we've got garbage bits, set them to all 1s - it's legal for the
@@ -1130,7 +1129,7 @@ static struct bkey_packed *bset_search_tree(const struct btree *b, goto slowpath; l = f->mantissa; - r =bkey_mantissa (packed_search, f, n); + r =bkey_mantissa (packed_search, f);if (unlikely (l == r) &&bkey_mantissa_bits_dropped (b, f, n)) goto slowpath;
Signature · 1 line
2.45.2
PATCH 2/2 bcachefs: Remove unused parameter of bkey_mantissa_bits_dropped
In reply to Alan HuangThe idx parameter of bkey_mantissa_bits_dropped is unused, remove it.
Signed-off-by Alan Huang <[email protected]>
--- fs/bcachefs/bset.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
fs/bcachefs/bset.c +2 -3
@@ -1094,8 +1094,7 @@ static inline void prefetch_four_cachelines(void *p) }static inline bool bkey_mantissa_bits_dropped (const struct btree *b, -const struct bkey_float *f, -unsigned idx) +const struct bkey_float *f) {#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__unsigned key_bits_start = b->format.key_u64s *64 - b->nr_key_bits;
@@ -1131,7 +1130,7 @@ static struct bkey_packed *bset_search_tree(const struct btree *b, l = f->mantissa; r =bkey_mantissa (packed_search, f); -if (unlikely (l == r) &&bkey_mantissa_bits_dropped (b, f, n)) +if (unlikely (l == r) &&bkey_mantissa_bits_dropped (b, f)) goto slowpath; n = n *2 + (l < r);
Signature · 1 line
2.45.2