* [PATCH 0/2] Remove two unused parameters
@ 2024-08-10 16:52 Alan Huang
2024-08-10 16:52 ` [PATCH 1/2] bcachefs: Remove unused parameter of bkey_mantissa Alan Huang
2024-08-10 16:52 ` [PATCH 2/2] bcachefs: Remove unused parameter of bkey_mantissa_bits_dropped Alan Huang
0 siblings, 2 replies; 3+ messages in thread
From: Alan Huang @ 2024-08-10 16:52 UTC (permalink / raw)
To: kent.overstreet; +Cc: linux-bcachefs, Alan Huang
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(-)
--
2.45.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] bcachefs: Remove unused parameter of bkey_mantissa
2024-08-10 16:52 [PATCH 0/2] Remove two unused parameters Alan Huang
@ 2024-08-10 16:52 ` Alan Huang
2024-08-10 16:52 ` [PATCH 2/2] bcachefs: Remove unused parameter of bkey_mantissa_bits_dropped Alan Huang
1 sibling, 0 replies; 3+ messages in thread
From: Alan Huang @ 2024-08-10 16:52 UTC (permalink / raw)
To: kent.overstreet; +Cc: linux-bcachefs, Alan Huang
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 <mmpgouride@gmail.com>
---
fs/bcachefs/bset.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/bcachefs/bset.c b/fs/bcachefs/bset.c
index e7c44f35f0c5..a2a87ed09f37 100644
--- a/fs/bcachefs/bset.c
+++ b/fs/bcachefs/bset.c
@@ -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;
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] bcachefs: Remove unused parameter of bkey_mantissa_bits_dropped
2024-08-10 16:52 [PATCH 0/2] Remove two unused parameters Alan Huang
2024-08-10 16:52 ` [PATCH 1/2] bcachefs: Remove unused parameter of bkey_mantissa Alan Huang
@ 2024-08-10 16:52 ` Alan Huang
1 sibling, 0 replies; 3+ messages in thread
From: Alan Huang @ 2024-08-10 16:52 UTC (permalink / raw)
To: kent.overstreet; +Cc: linux-bcachefs, Alan Huang
The idx parameter of bkey_mantissa_bits_dropped is unused, remove it.
Signed-off-by: Alan Huang <mmpgouride@gmail.com>
---
fs/bcachefs/bset.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/bcachefs/bset.c b/fs/bcachefs/bset.c
index a2a87ed09f37..00a821f617a5 100644
--- a/fs/bcachefs/bset.c
+++ b/fs/bcachefs/bset.c
@@ -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);
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-10 16:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-10 16:52 [PATCH 0/2] Remove two unused parameters Alan Huang
2024-08-10 16:52 ` [PATCH 1/2] bcachefs: Remove unused parameter of bkey_mantissa Alan Huang
2024-08-10 16:52 ` [PATCH 2/2] bcachefs: Remove unused parameter of bkey_mantissa_bits_dropped Alan Huang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox