diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-10-20 01:31:33 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:44 +0300 |
commit | 3e3e02e6bce627ed9e3a5d9fd3118e6569dc2548 (patch) | |
tree | 33fc60a2903692a2038dd4b87dfa6b87a207b7e1 /fs/bcachefs/journal.c | |
parent | ed80c5699a23c4005ba8e81d4b8fb3e1b922fa40 (diff) | |
download | linux-3e3e02e6bce627ed9e3a5d9fd3118e6569dc2548.tar.xz |
bcachefs: Assorted checkpatch fixes
checkpatch.pl gives lots of warnings that we don't want - suggested
ignore list:
ASSIGN_IN_IF
UNSPECIFIED_INT - bcachefs coding style prefers single token type names
NEW_TYPEDEFS - typedefs are occasionally good
FUNCTION_ARGUMENTS - we prefer to look at functions in .c files
(hopefully with docbook documentation), not .h
file prototypes
MULTISTATEMENT_MACRO_USE_DO_WHILE
- we have _many_ x-macros and other macros where
we can't do this
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal.c')
-rw-r--r-- | fs/bcachefs/journal.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index 97c1ecb65dbd..ed3ed3072db1 100644 --- a/fs/bcachefs/journal.c +++ b/fs/bcachefs/journal.c @@ -738,7 +738,7 @@ int bch2_journal_log_msg(struct journal *j, const char *fmt, ...) return ret; entry = container_of(journal_res_entry(j, &res), - struct jset_entry_log, entry);; + struct jset_entry_log, entry); memset(entry, 0, u64s * sizeof(u64)); entry->entry.type = BCH_JSET_ENTRY_log; entry->entry.u64s = u64s - 1; @@ -795,10 +795,10 @@ static int __bch2_set_nr_journal_buckets(struct bch_dev *ca, unsigned nr, bch2_journal_block(&c->journal); } - bu = kzalloc(nr_want * sizeof(*bu), GFP_KERNEL); - ob = kzalloc(nr_want * sizeof(*ob), GFP_KERNEL); - new_buckets = kzalloc(nr * sizeof(u64), GFP_KERNEL); - new_bucket_seq = kzalloc(nr * sizeof(u64), GFP_KERNEL); + bu = kcalloc(nr_want, sizeof(*bu), GFP_KERNEL); + ob = kcalloc(nr_want, sizeof(*ob), GFP_KERNEL); + new_buckets = kcalloc(nr, sizeof(u64), GFP_KERNEL); + new_bucket_seq = kcalloc(nr, sizeof(u64), GFP_KERNEL); if (!bu || !ob || !new_buckets || !new_bucket_seq) { ret = -ENOMEM; goto err_unblock; @@ -1264,7 +1264,7 @@ void __bch2_journal_debug_to_text(struct printbuf *out, struct journal *j) rcu_read_lock(); s = READ_ONCE(j->reservations); - prt_printf(out, "dirty journal entries:\t%llu/%llu\n",fifo_used(&j->pin), j->pin.size); + prt_printf(out, "dirty journal entries:\t%llu/%llu\n", fifo_used(&j->pin), j->pin.size); prt_printf(out, "seq:\t\t\t%llu\n", journal_cur_seq(j)); prt_printf(out, "seq_ondisk:\t\t%llu\n", j->seq_ondisk); prt_printf(out, "last_seq:\t\t%llu\n", journal_last_seq(j)); |