mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Michel Lespinasse <walken@google.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Pekka Enberg <penberg@kernel.org>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] rbtree: include linux/compiler.h for definition of __always_inline
Date: Tue, 23 Oct 2012 10:29:27 +0100	[thread overview]
Message-ID: <20121023092927.GB19167@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <CANN689HrJMyQSXTjwJtMmyxJvccgMd-9EzRA-JsgDCp+STX6qw@mail.gmail.com>

On Mon, Oct 22, 2012 at 10:56:21PM +0100, Michel Lespinasse wrote:
> On Mon, Oct 22, 2012 at 10:01 AM, Will Deacon <will.deacon@arm.com> wrote:
> > 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’
> >
> > This patch includes linux/compiler.h in rbtree_augmented.h so that the
> > __always_inline macro is resolved correctly.
> >
> > Cc: Pekka Enberg <penberg@kernel.org>
> > Cc: Michel Lespinasse <walken@google.com>
> > Cc: Ingo Molnar <mingo@elte.hu>
> > Signed-off-by: Will Deacon <will.deacon@arm.com>
> 
> Just curious - what are you going to implement with augmented rbtrees
> in kvm tool ?
> 
> If the basic rbtree or the interval tree implementations are
> sufficient for your usage, you should try using that (in which case
> you won't need this header fix).

kvm tool uses interval rbtrees for things like keeping track of virtual
devices, although it looks like Ingo implemented the augment callbacks
while moving to -rc1.

> But either way, the header fix is correct and will be required when
> someone wants to use augmented rbtrees outside of the kernel. I just
> didn't think that day would come so fast :)
> 
> Reviewed-by: Michel Lespinasse <walken@google.com>

Thanks Michel!

Will

  reply	other threads:[~2012-10-23  9:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-22 17:01 Will Deacon
2012-10-22 21:56 ` Michel Lespinasse
2012-10-23  9:29   ` Will Deacon [this message]
2012-10-24  7:45     ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121023092927.GB19167@mudshark.cambridge.arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=penberg@kernel.org \
    --cc=walken@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®