summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/replicas.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-07-06 22:47:42 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:10:06 -0400
commit73bd774d28d2b2e6a05c31bf7afb9247e02a8e49 (patch)
tree21ab80d4b966d92647ea178bc5707a8534e5d123 /fs/bcachefs/replicas.c
parent236b68da5017b5336b332f941323a5bc450594b3 (diff)
downloadlinux-73bd774d28d2b2e6a05c31bf7afb9247e02a8e49.tar.gz
linux-73bd774d28d2b2e6a05c31bf7afb9247e02a8e49.tar.bz2
linux-73bd774d28d2b2e6a05c31bf7afb9247e02a8e49.zip
bcachefs: Assorted sparse fixes
- endianness fixes - mark some things static - fix a few __percpu annotations - fix silent enum conversions Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/replicas.c')
-rw-r--r--fs/bcachefs/replicas.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/replicas.c b/fs/bcachefs/replicas.c
index 76efbfce7683..d4c1d43e8c41 100644
--- a/fs/bcachefs/replicas.c
+++ b/fs/bcachefs/replicas.c
@@ -36,8 +36,8 @@ static void bch2_cpu_replicas_sort(struct bch_replicas_cpu *r)
eytzinger0_sort(r->entries, r->nr, r->entry_size, memcmp, NULL);
}
-void bch2_replicas_entry_v0_to_text(struct printbuf *out,
- struct bch_replicas_entry_v0 *e)
+static void bch2_replicas_entry_v0_to_text(struct printbuf *out,
+ struct bch_replicas_entry_v0 *e)
{
unsigned i;
@@ -272,7 +272,7 @@ static void __replicas_table_update_pcpu(struct bch_fs_usage __percpu *dst_p,
{
unsigned src_nr = sizeof(struct bch_fs_usage) / sizeof(u64) + src_r->nr;
struct bch_fs_usage *dst, *src = (void *)
- bch2_acc_percpu_u64s((void *) src_p, src_nr);
+ bch2_acc_percpu_u64s((u64 __percpu *) src_p, src_nr);
preempt_disable();
dst = this_cpu_ptr(dst_p);