From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753844AbcHRJ3D (ORCPT ); Thu, 18 Aug 2016 05:29:03 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:40567 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752965AbcHRJ3C (ORCPT ); Thu, 18 Aug 2016 05:29:02 -0400 Date: Thu, 18 Aug 2016 11:01:16 +0200 From: Peter Zijlstra To: zijun_hu Cc: Andrew Morton , dhowells@redhat.com, linux-kernel@vger.kernel.org, zijun_hu@htc.com Subject: Re: [PATCH 1/1] rbtree: correct mask for extracting node's parent Message-ID: <20160818090116.GA25687@twins.programming.kicks-ass.net> References: <57B56F7E.7090608@zoho.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57B56F7E.7090608@zoho.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 18, 2016 at 04:19:10PM +0800, zijun_hu wrote: > From: zijun_hu > > for LP64 ABI, struct rb_node aligns at 8 bytes boundary due to > sizeof(long) == 8 normally, so 0x07 should be used to extract > node's parent rather than 0x03 Doesn't matter though, in practise. The remaining bits are always 0.