bcache: Style/checkpatch fixes

Took out some nested functions, and fixed some more checkpatch
complaints.

Signed-off-by: Kent Overstreet <koverstreet@google.com>
Cc: linux-bcache@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Kent Overstreet
2013-03-25 11:46:44 -07:00
committed by Jens Axboe
parent 07e86ccb54
commit b1a67b0f4c
10 changed files with 51 additions and 56 deletions
+6 -16
View File
@@ -229,24 +229,14 @@ static void invalidate_one_bucket(struct cache *ca, struct bucket *b)
fifo_push(&ca->free_inc, b - ca->buckets);
}
#define bucket_prio(b) \
(((unsigned) (b->prio - ca->set->min_prio)) * GC_SECTORS_USED(b))
#define bucket_max_cmp(l, r) (bucket_prio(l) < bucket_prio(r))
#define bucket_min_cmp(l, r) (bucket_prio(l) > bucket_prio(r))
static void invalidate_buckets_lru(struct cache *ca)
{
unsigned bucket_prio(struct bucket *b)
{
return ((unsigned) (b->prio - ca->set->min_prio)) *
GC_SECTORS_USED(b);
}
bool bucket_max_cmp(struct bucket *l, struct bucket *r)
{
return bucket_prio(l) < bucket_prio(r);
}
bool bucket_min_cmp(struct bucket *l, struct bucket *r)
{
return bucket_prio(l) > bucket_prio(r);
}
struct bucket *b;
ssize_t i;