bcache: style fixes for lines over 80 characters
This patch fixes the lines over 80 characters into more lines, to minimize warnings by checkpatch.pl. There are still some lines exceed 80 characters, but it is better to be a single line and I don't change them. Signed-off-by: Coly Li <colyli@suse.de> Reviewed-by: Shenghui Wang <shhuiw@foxmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -149,7 +149,8 @@ static const char *read_super(struct cache_sb *sb, struct block_device *bdev,
|
||||
goto err;
|
||||
|
||||
err = "Invalid superblock: device too small";
|
||||
if (get_capacity(bdev->bd_disk) < sb->bucket_size * sb->nbuckets)
|
||||
if (get_capacity(bdev->bd_disk) <
|
||||
sb->bucket_size * sb->nbuckets)
|
||||
goto err;
|
||||
|
||||
err = "Bad UUID";
|
||||
@@ -600,7 +601,8 @@ static void prio_read(struct cache *ca, uint64_t bucket)
|
||||
|
||||
prio_io(ca, bucket, REQ_OP_READ, 0);
|
||||
|
||||
if (p->csum != bch_crc64(&p->magic, bucket_bytes(ca) - 8))
|
||||
if (p->csum !=
|
||||
bch_crc64(&p->magic, bucket_bytes(ca) - 8))
|
||||
pr_warn("bad csum reading priorities");
|
||||
|
||||
if (p->magic != pset_magic(&ca->sb))
|
||||
@@ -1740,8 +1742,8 @@ struct cache_set *bch_cache_set_alloc(struct cache_sb *sb)
|
||||
if (!(c->devices = kcalloc(c->nr_uuids, sizeof(void *), GFP_KERNEL)) ||
|
||||
mempool_init_slab_pool(&c->search, 32, bch_search_cache) ||
|
||||
mempool_init_kmalloc_pool(&c->bio_meta, 2,
|
||||
sizeof(struct bbio) + sizeof(struct bio_vec) *
|
||||
bucket_pages(c)) ||
|
||||
sizeof(struct bbio) + sizeof(struct bio_vec) *
|
||||
bucket_pages(c)) ||
|
||||
mempool_init_kmalloc_pool(&c->fill_iter, 1, iter_size) ||
|
||||
bioset_init(&c->bio_split, 4, offsetof(struct bbio, bio),
|
||||
BIOSET_NEED_BVECS|BIOSET_NEED_RESCUER) ||
|
||||
@@ -1813,7 +1815,9 @@ static void run_cache_set(struct cache_set *c)
|
||||
goto err;
|
||||
|
||||
err = "error reading btree root";
|
||||
c->root = bch_btree_node_get(c, NULL, k, j->btree_level, true, NULL);
|
||||
c->root = bch_btree_node_get(c, NULL, k,
|
||||
j->btree_level,
|
||||
true, NULL);
|
||||
if (IS_ERR_OR_NULL(c->root))
|
||||
goto err;
|
||||
|
||||
@@ -2107,7 +2111,9 @@ static int register_cache(struct cache_sb *sb, struct page *sb_page,
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (kobject_add(&ca->kobj, &part_to_dev(bdev->bd_part)->kobj, "bcache")) {
|
||||
if (kobject_add(&ca->kobj,
|
||||
&part_to_dev(bdev->bd_part)->kobj,
|
||||
"bcache")) {
|
||||
err = "error calling kobject_add";
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
|
Reference in New Issue
Block a user