diff mbox

[v2,1/8] rbtree: include linux/compiler.h for definition of __always_inline

Message ID 1353599897-15656-2-git-send-email-will.deacon@arm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Will Deacon Nov. 22, 2012, 3:58 p.m. UTC
Commit 29fc7c5a4f516d388fb6e1f6d24bfb04b8093e54 upstream.

rb_erase_augmented() is a static function annotated with
__always_inline.  This causes a compile failure when attempting to use
the rbtree implementation as a library (e.g.  kvm tool):

  rbtree_augmented.h:125:24: error: expected `=', `,', `;', `asm' or `__attribute__' before `void'

Include linux/compiler.h in rbtree_augmented.h so that the __always_inline
macro is resolved correctly.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: Pekka Enberg <penberg@kernel.org>
Reviewed-by: Michel Lespinasse <walken@google.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 include/linux/rbtree_augmented.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Will Deacon Nov. 23, 2012, 2:36 p.m. UTC | #1
Hi Sasha,

On Thu, Nov 22, 2012 at 06:44:34PM +0000, Sasha Levin wrote:
> On 11/22/2012 10:58 AM, Will Deacon wrote:
> > Commit 29fc7c5a4f516d388fb6e1f6d24bfb04b8093e54 upstream.
> > 
> > rb_erase_augmented() is a static function annotated with
> > __always_inline.  This causes a compile failure when attempting to use
> > the rbtree implementation as a library (e.g.  kvm tool):
> > 
> >   rbtree_augmented.h:125:24: error: expected `=', `,', `;', `asm' or `__attribute__' before `void'
> 
> On a side note, our rbtree-interval is broken at the moment due to kernel side
> changing the implementation and (IMO) breaking augmented rbtrees, followed
> by several patches in our own code that tried to fix the breakage but haven't
> identified the problem correctly - leading to more subtle breakage.
> 
> If you see things broken with mmio, that might be the reason.

Interesting... the only problems I've seen with MMIO so far have all been
related to highmem and I've been sending patches for those (should all make
it for 3.8).

What specifically do you see when things go wrong?

Will
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/linux/rbtree_augmented.h b/include/linux/rbtree_augmented.h
index 214caa3..2ac60c9 100644
--- a/include/linux/rbtree_augmented.h
+++ b/include/linux/rbtree_augmented.h
@@ -24,6 +24,7 @@ 
 #ifndef _LINUX_RBTREE_AUGMENTED_H
 #define _LINUX_RBTREE_AUGMENTED_H
 
+#include <linux/compiler.h>
 #include <linux/rbtree.h>
 
 /*