summaryrefslogtreecommitdiff
path: root/fs/bcachefs/opts.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-08-02 03:06:45 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:10:09 +0300
commitbf5a261c7af80a2ac10bcc3ce0382cb238eccb8b (patch)
treeba891c5c8486cc26935c90b4c899baf1ae86af9d /fs/bcachefs/opts.c
parent7904c82ceae963b0f89e96a49dc714adffe3adc6 (diff)
downloadlinux-bf5a261c7af80a2ac10bcc3ce0382cb238eccb8b.tar.xz
bcachefs: Assorted fixes for clang
clang had a few more warnings about enum conversion, and also didn't like the opts.c initializer. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/opts.c')
-rw-r--r--fs/bcachefs/opts.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bcachefs/opts.c b/fs/bcachefs/opts.c
index 3a6fd1d96ed2..4d0daeba6f59 100644
--- a/fs/bcachefs/opts.c
+++ b/fs/bcachefs/opts.c
@@ -121,10 +121,10 @@ static void bch2_opt_fix_errors_to_text(struct printbuf *out,
prt_str(out, bch2_fsck_fix_opts[v]);
}
-static const struct bch_opt_fn bch2_opt_fix_errors = {
- .parse = bch2_opt_fix_errors_parse,
- .to_text = bch2_opt_fix_errors_to_text,
-};
+#define bch2_opt_fix_errors (struct bch_opt_fn) { \
+ .parse = bch2_opt_fix_errors_parse, \
+ .to_text = bch2_opt_fix_errors_to_text, \
+}
const char * const bch2_d_types[BCH_DT_MAX] = {
[DT_UNKNOWN] = "unknown",