aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kfifo.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2009-06-19 08:20:55 +1000
committerJames Morris <jmorris@namei.org>2009-06-19 08:20:55 +1000
commitd905163c5b23f6d8511971e06081a1b525e8a0bd (patch)
treef76918c1be802ec068d37763466f5518efdb690e /kernel/kfifo.c
parentAdd audit messages on type boundary violations (diff)
parentMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 (diff)
downloadlinux-dev-d905163c5b23f6d8511971e06081a1b525e8a0bd.tar.xz
linux-dev-d905163c5b23f6d8511971e06081a1b525e8a0bd.zip
Merge branch 'master' into next
Diffstat (limited to 'kernel/kfifo.c')
-rw-r--r--kernel/kfifo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/kfifo.c b/kernel/kfifo.c
index bc41ad0f24f8..26539e3228e5 100644
--- a/kernel/kfifo.c
+++ b/kernel/kfifo.c
@@ -72,9 +72,9 @@ struct kfifo *kfifo_alloc(unsigned int size, gfp_t gfp_mask, spinlock_t *lock)
/*
* round up to the next power of 2, since our 'let the indices
- * wrap' tachnique works only in this case.
+ * wrap' technique works only in this case.
*/
- if (size & (size - 1)) {
+ if (!is_power_of_2(size)) {
BUG_ON(size > 0x80000000);
size = roundup_pow_of_two(size);
}