Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359417
b: refs/heads/master
c: dfe2a77
h: refs/heads/master
i:
  359415: d404105
v: v3
  • Loading branch information
Stefani Seibold authored and Linus Torvalds committed Feb 28, 2013
1 parent 87629ca commit 0e3309f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c759b35e6469fe7519e9fe45d5285d49f12cb657
refs/heads/master: dfe2a77fd243ac3bf204fd0624e4d0b2134aaa6d
6 changes: 2 additions & 4 deletions trunk/lib/kfifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ int __kfifo_alloc(struct __kfifo *fifo, unsigned int size,
* round down to the next power of 2, since our 'let the indices
* wrap' technique works only in this case.
*/
if (!is_power_of_2(size))
size = rounddown_pow_of_two(size);
size = roundup_pow_of_two(size);

fifo->in = 0;
fifo->out = 0;
Expand Down Expand Up @@ -83,8 +82,7 @@ int __kfifo_init(struct __kfifo *fifo, void *buffer,
{
size /= esize;

if (!is_power_of_2(size))
size = rounddown_pow_of_two(size);
size = roundup_pow_of_two(size);

fifo->in = 0;
fifo->out = 0;
Expand Down

0 comments on commit 0e3309f

Please sign in to comment.