From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Graf Subject: Re: [v3 PATCH 2/9] rhashtable: Eliminate unnecessary branch in rht_key_hashfn Date: Mon, 23 Mar 2015 13:58:11 +0000 Message-ID: <20150323135811.GA9478@casper.infradead.org> References: <20150323134955.GA16328@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "David S. Miller" , Eric Dumazet , Patrick McHardy , Josh Triplett , "Paul E. McKenney" , netdev@vger.kernel.org To: Herbert Xu Return-path: Received: from casper.infradead.org ([85.118.1.10]:56164 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752207AbbCWN6P (ORCPT ); Mon, 23 Mar 2015 09:58:15 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On 03/24/15 at 12:50am, Herbert Xu wrote: > When rht_key_hashfn is called from rhashtable itself and params > is equal to ht->p, there is no point in checking params.key_len > and falling back to ht->p.key_len. > > For some reason gcc couldn't figure out that params is the same > as ht->p. So let's help it by only checking params.key_len when > it's a constant. > > Signed-off-by: Herbert Xu Acked-by: Thomas Graf