diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-09 18:08:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-09 18:08:37 -0500 |
commit | a90fcf311199b0199e94e78fca899abf2aeb852b (patch) | |
tree | 0b916c9f11006d4452eefa2013a4c63a9ed4d43f /include | |
parent | c5b875e354a54e2b5ba24eecae69bf94e025edd5 (diff) | |
parent | 6f78a19702574008bbd333237380fa85be1c9e5d (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC64]: Use "is_power_of_2" macro for simplicity.
[SPARC]: Remove duplicate includes.
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-sparc64/vio.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-sparc64/vio.h b/include/asm-sparc64/vio.h index f7417e91b170..d4de32f0f8af 100644 --- a/include/asm-sparc64/vio.h +++ b/include/asm-sparc64/vio.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/spinlock.h> | 8 | #include <linux/spinlock.h> |
9 | #include <linux/completion.h> | 9 | #include <linux/completion.h> |
10 | #include <linux/list.h> | 10 | #include <linux/list.h> |
11 | #include <linux/log2.h> | ||
11 | 12 | ||
12 | #include <asm/ldc.h> | 13 | #include <asm/ldc.h> |
13 | #include <asm/mdesc.h> | 14 | #include <asm/mdesc.h> |
@@ -257,8 +258,7 @@ static inline void *vio_dring_entry(struct vio_dring_state *dr, | |||
257 | static inline u32 vio_dring_avail(struct vio_dring_state *dr, | 258 | static inline u32 vio_dring_avail(struct vio_dring_state *dr, |
258 | unsigned int ring_size) | 259 | unsigned int ring_size) |
259 | { | 260 | { |
260 | /* Ensure build-time power-of-2. */ | 261 | BUILD_BUG_ON(!is_power_of_2(ring_size)); |
261 | BUILD_BUG_ON(ring_size & (ring_size - 1)); | ||
262 | 262 | ||
263 | return (dr->pending - | 263 | return (dr->pending - |
264 | ((dr->prod - dr->cons) & (ring_size - 1))); | 264 | ((dr->prod - dr->cons) & (ring_size - 1))); |