> Maybe. I thought I'd actually done it once before, but I couldn't
> actually find it when I went looking.
Yeah, that's what I remember too.
> Plenty more words in the git commit.
Ah! of course, thanks.
> They don't make much sense without
> the patch right below them, and you can see them in juxtaposition at
> http://git.infradead.org/?p=users/dwmw2/rbtree-2.6.git;a=commitdiff;h=1975e59375756da4ff4e6e7d12f67485e813ace0
Indeed, that reasoning looks sound. First the if (parent) .. else {}
falls away, then the parent left/right relationship is folded into the
test with old. Looks good.
> I think it's be better just to drop the RB_RED and RB_BLACK definitions.
I'd agree, I figured you'd left them for a reason.
>>> +static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p)
>>> +{
>> BUG_ON((unsigned long)p & 3);
>
> Yeah, I suppose we could.
>>> + node->rb_parent_colour = (unsigned long )parent;
>> use rb_set_parent(node, parent) and get the assertion.
>
> Que?
I meant that if we add the BUG_ON() to rb_set_parent() then we might as
well reuse it here..
- z
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]