diff options
author | Coly Li <colyli@suse.de> | 2018-08-11 01:19:55 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-08-11 17:46:42 -0400 |
commit | 3be11dbab67a3ed28358a950671de9b8e7fb5a02 (patch) | |
tree | 5c04042b9541410e0b1a82fb4860e094461700cf | |
parent | 3069211be30015b78e096fc4d3774b7d4ba29781 (diff) |
bcache: fix code comments style
This patch fixes 3 style issues warned by checkpatch.pl,
- Comment lines are not aligned
- Comments use "/*" on subsequent lines
- Comment lines use a trailing "*/"
Signed-off-by: Coly Li <colyli@suse.de>
Reviewed-by: Shenghui Wang <shhuiw@foxmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | drivers/md/bcache/bset.c | 9 | ||||
-rw-r--r-- | drivers/md/bcache/super.c | 22 | ||||
-rw-r--r-- | drivers/md/bcache/writeback.c | 3 |
3 files changed, 21 insertions, 13 deletions
diff --git a/drivers/md/bcache/bset.c b/drivers/md/bcache/bset.c index b6a3f9d291a9..8f07fa6e1739 100644 --- a/drivers/md/bcache/bset.c +++ b/drivers/md/bcache/bset.c | |||
@@ -402,7 +402,8 @@ static unsigned int inorder_prev(unsigned int j, unsigned int size) | |||
402 | return j; | 402 | return j; |
403 | } | 403 | } |
404 | 404 | ||
405 | /* I have no idea why this code works... and I'm the one who wrote it | 405 | /* |
406 | * I have no idea why this code works... and I'm the one who wrote it | ||
406 | * | 407 | * |
407 | * However, I do know what it does: | 408 | * However, I do know what it does: |
408 | * Given a binary tree constructed in an array (i.e. how you normally implement | 409 | * Given a binary tree constructed in an array (i.e. how you normally implement |
@@ -795,7 +796,8 @@ static void bch_bset_fix_lookup_table(struct btree_keys *b, | |||
795 | if (!t->size) | 796 | if (!t->size) |
796 | return; | 797 | return; |
797 | 798 | ||
798 | /* k is the key we just inserted; we need to find the entry in the | 799 | /* |
800 | * k is the key we just inserted; we need to find the entry in the | ||
799 | * lookup table for the first key that is strictly greater than k: | 801 | * lookup table for the first key that is strictly greater than k: |
800 | * it's either k's cacheline or the next one | 802 | * it's either k's cacheline or the next one |
801 | */ | 803 | */ |
@@ -803,7 +805,8 @@ static void bch_bset_fix_lookup_table(struct btree_keys *b, | |||
803 | table_to_bkey(t, j) <= k) | 805 | table_to_bkey(t, j) <= k) |
804 | j++; | 806 | j++; |
805 | 807 | ||
806 | /* Adjust all the lookup table entries, and find a new key for any that | 808 | /* |
809 | * Adjust all the lookup table entries, and find a new key for any that | ||
807 | * have gotten too big | 810 | * have gotten too big |
808 | */ | 811 | */ |
809 | for (; j < t->size; j++) { | 812 | for (; j < t->size; j++) { |
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 2a7be104557e..01fc3c015a58 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c | |||
@@ -465,8 +465,8 @@ static struct uuid_entry *uuid_find_empty(struct cache_set *c) | |||
465 | * Bucket priorities/gens: | 465 | * Bucket priorities/gens: |
466 | * | 466 | * |
467 | * For each bucket, we store on disk its | 467 | * For each bucket, we store on disk its |
468 | * 8 bit gen | 468 | * 8 bit gen |
469 | * 16 bit priority | 469 | * 16 bit priority |
470 | * | 470 | * |
471 | * See alloc.c for an explanation of the gen. The priority is used to implement | 471 | * See alloc.c for an explanation of the gen. The priority is used to implement |
472 | * lru (and in the future other) cache replacement policies; for most purposes | 472 | * lru (and in the future other) cache replacement policies; for most purposes |
@@ -934,8 +934,10 @@ void bch_cached_dev_run(struct cached_dev *dc) | |||
934 | 934 | ||
935 | add_disk(d->disk); | 935 | add_disk(d->disk); |
936 | bd_link_disk_holder(dc->bdev, dc->disk.disk); | 936 | bd_link_disk_holder(dc->bdev, dc->disk.disk); |
937 | /* won't show up in the uevent file, use udevadm monitor -e instead | 937 | /* |
938 | * only class / kset properties are persistent */ | 938 | * won't show up in the uevent file, use udevadm monitor -e instead |
939 | * only class / kset properties are persistent | ||
940 | */ | ||
939 | kobject_uevent_env(&disk_to_dev(d->disk)->kobj, KOBJ_CHANGE, env); | 941 | kobject_uevent_env(&disk_to_dev(d->disk)->kobj, KOBJ_CHANGE, env); |
940 | kfree(env[1]); | 942 | kfree(env[1]); |
941 | kfree(env[2]); | 943 | kfree(env[2]); |
@@ -1104,8 +1106,9 @@ int bch_cached_dev_attach(struct cached_dev *dc, struct cache_set *c, | |||
1104 | } | 1106 | } |
1105 | } | 1107 | } |
1106 | 1108 | ||
1107 | /* Deadlocks since we're called via sysfs... | 1109 | /* |
1108 | sysfs_remove_file(&dc->kobj, &sysfs_attach); | 1110 | * Deadlocks since we're called via sysfs... |
1111 | * sysfs_remove_file(&dc->kobj, &sysfs_attach); | ||
1109 | */ | 1112 | */ |
1110 | 1113 | ||
1111 | if (bch_is_zero(u->uuid, 16)) { | 1114 | if (bch_is_zero(u->uuid, 16)) { |
@@ -1468,9 +1471,10 @@ bool bch_cache_set_error(struct cache_set *c, const char *fmt, ...) | |||
1468 | if (test_and_set_bit(CACHE_SET_IO_DISABLE, &c->flags)) | 1471 | if (test_and_set_bit(CACHE_SET_IO_DISABLE, &c->flags)) |
1469 | pr_info("CACHE_SET_IO_DISABLE already set"); | 1472 | pr_info("CACHE_SET_IO_DISABLE already set"); |
1470 | 1473 | ||
1471 | /* XXX: we can be called from atomic context | 1474 | /* |
1472 | acquire_console_sem(); | 1475 | * XXX: we can be called from atomic context |
1473 | */ | 1476 | * acquire_console_sem(); |
1477 | */ | ||
1474 | 1478 | ||
1475 | pr_err("bcache: error on %pU: ", c->sb.set_uuid); | 1479 | pr_err("bcache: error on %pU: ", c->sb.set_uuid); |
1476 | 1480 | ||
diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c index e40bf0e403e7..6be05bd7ca67 100644 --- a/drivers/md/bcache/writeback.c +++ b/drivers/md/bcache/writeback.c | |||
@@ -468,7 +468,8 @@ static void read_dirty(struct cached_dev *dc) | |||
468 | 468 | ||
469 | down(&dc->in_flight); | 469 | down(&dc->in_flight); |
470 | 470 | ||
471 | /* We've acquired a semaphore for the maximum | 471 | /* |
472 | * We've acquired a semaphore for the maximum | ||
472 | * simultaneous number of writebacks; from here | 473 | * simultaneous number of writebacks; from here |
473 | * everything happens asynchronously. | 474 | * everything happens asynchronously. |
474 | */ | 475 | */ |