Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752247AbbGaJtZ (ORCPT ); Fri, 31 Jul 2015 05:49:25 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:35701 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751028AbbGaJtY (ORCPT ); Fri, 31 Jul 2015 05:49:24 -0400 Date: Fri, 31 Jul 2015 15:19:20 +0530 From: Viresh Kumar To: Vlastimil Babka Cc: akpm@linux-foundation.org, linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Steven Rostedt Subject: Re: [PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL) Message-ID: <20150731094920.GB11856@linux> References: <55BB42B5.5070409@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55BB42B5.5070409@suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 952 Lines: 27 On 31-07-15, 11:41, Vlastimil Babka wrote: > [+CC Steven Rostedt] > > Any idea what the compiler does in the case of > "if (likely(IS_ERR(...)))"? There are apparently such cases in the source. > > does the "likely" somehow override the "unlikely" of IS_ERR, or is > the resulting code a mess? Good point. While fixing all the sites, I saw some code like that. Then before posting the series, I tried to look at what compilers do to such codes and they generated exactly same code for: likely(unlikely(x)) and unlikely(x). So, either those call sites should drop the likely bits or we supply them with another raw version of the macro :) Or if my tests were wrong, then please lemme know. -- viresh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/