diff options
| author | Tejun Heo <tj@kernel.org> | 2012-11-06 12:26:23 -0800 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2012-11-06 12:26:23 -0800 |
| commit | 5b805f2a7675634fbdf9ac1c9b2256905ab2ea68 (patch) | |
| tree | ee00d1e3d757458d66209b926d274491c6c3f61c /lib | |
| parent | 1db1e31b1ee3ae126ef98f39083b5f213c7b41bf (diff) | |
| parent | 201e72acb2d3821e2de9ce6091e98859c316b29a (diff) | |
Merge branch 'cgroup/for-3.7-fixes' into cgroup/for-3.8
This is to receive device_cgroup fixes so that further device_cgroup
changes can be made in cgroup/for-3.8.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/dma-debug.c | 4 | ||||
| -rw-r--r-- | lib/genalloc.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c index b9087bff008b..d84beb994f36 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -264,7 +264,7 @@ static struct dma_debug_entry *__hash_bucket_find(struct hash_bucket *bucket, match_fn match) { struct dma_debug_entry *entry, *ret = NULL; - int matches = 0, match_lvl, last_lvl = 0; + int matches = 0, match_lvl, last_lvl = -1; list_for_each_entry(entry, &bucket->list, list) { if (!match(ref, entry)) @@ -293,7 +293,7 @@ static struct dma_debug_entry *__hash_bucket_find(struct hash_bucket *bucket, } else if (match_lvl > last_lvl) { /* * We found an entry that fits better then the - * previous one + * previous one or it is the 1st match. */ last_lvl = match_lvl; ret = entry; diff --git a/lib/genalloc.c b/lib/genalloc.c index ca208a92628c..54920433705a 100644 --- a/lib/genalloc.c +++ b/lib/genalloc.c @@ -178,7 +178,7 @@ int gen_pool_add_virt(struct gen_pool *pool, unsigned long virt, phys_addr_t phy struct gen_pool_chunk *chunk; int nbits = size >> pool->min_alloc_order; int nbytes = sizeof(struct gen_pool_chunk) + - (nbits + BITS_PER_BYTE - 1) / BITS_PER_BYTE; + BITS_TO_LONGS(nbits) * sizeof(long); chunk = kmalloc_node(nbytes, GFP_KERNEL | __GFP_ZERO, nid); if (unlikely(chunk == NULL)) |
