public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: andrea@suse.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Shrink rbtree
Date: Fri, 21 Apr 2006 18:09:15 -0700	[thread overview]
Message-ID: <20060421180915.1f2d61a4.akpm@osdl.org> (raw)
In-Reply-To: <1145623663.11909.139.camel@pmac.infradead.org>

David Woodhouse <dwmw2@infradead.org> wrote:
>
> git://git.infradead.org/~dwmw2/rbtree-2.6

include/linux/hrtimer.h: In function `hrtimer_active':
include/linux/hrtimer.h:130: structure has no member named `rb_parent'

Might I cast aspersions upon the quality of your testing?



#define HRTIMER_INACTIVE	((void *)1UL)

...

static inline int hrtimer_active(const struct hrtimer *timer)
{
	return rb_parent(timer->node) != HRTIMER_INACTIVE;
}


So we have somewhat-competing hackery here.

Testing this...

--- devel/include/linux/hrtimer.h~git-rbtree-hrtimer-fix	2006-04-21 18:03:44.000000000 -0700
+++ devel-akpm/include/linux/hrtimer.h	2006-04-21 18:08:02.000000000 -0700
@@ -34,7 +34,7 @@ enum hrtimer_restart {
 	HRTIMER_RESTART,
 };
 
-#define HRTIMER_INACTIVE	((void *)1UL)
+#define HRTIMER_INACTIVE	((void *)-2)
 
 struct hrtimer_base;
 
@@ -127,7 +127,7 @@ extern ktime_t hrtimer_get_next_event(vo
 
 static inline int hrtimer_active(const struct hrtimer *timer)
 {
-	return timer->node.rb_parent != HRTIMER_INACTIVE;
+	return rb_parent(&timer->node) != HRTIMER_INACTIVE;
 }
 
 /* Forward a hrtimer so it expires after now: */
_


  parent reply	other threads:[~2006-04-22  1:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-21 12:47 [PATCH] Shrink rbtree David Woodhouse
2006-04-21 13:06 ` Nick Piggin
2006-04-21 19:08   ` David Woodhouse
2006-04-21 20:57     ` Hugh Dickins
2006-04-21 22:12       ` David Woodhouse
2006-04-23 13:03         ` Hugh Dickins
2006-04-21 18:24 ` Zach Brown
2006-04-21 19:06   ` David Woodhouse
2006-04-21 19:25     ` Zach Brown
2006-04-22  1:09 ` Andrew Morton [this message]
2006-04-22  1:10   ` Andrew Morton
2006-04-22  1:21     ` Andrew Morton
2006-04-22  1:29   ` David Woodhouse
2006-04-22 12:29     ` Ingo Oeser
2006-04-22 13:38       ` David Woodhouse
2006-04-22 22:55         ` Ingo Oeser
2006-04-23 16:36   ` Steven Rostedt
2006-04-23 17:20     ` Thomas Gleixner

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=20060421180915.1f2d61a4.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=andrea@suse.de \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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