From patchwork Fri Jul 31 08:38:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 51747 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id 1A4E222A8D for ; Fri, 31 Jul 2015 08:39:22 +0000 (UTC) Received: by lbcjf8 with SMTP id jf8sf21861245lbc.0 for ; Fri, 31 Jul 2015 01:39:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=c6jmfLZOZ9Pjf1Pd9NB43N5smq/xIbj3Y80rAYQmVrI=; b=ZW3778WVPHS9Jefu/IWlXvAMfGV38mf1VAMY2c831f6c7hBYGFEgUooCOmdLpGflz5 IrMD5KpjbyjdUWVNwa94t26C6TeOx7qqTFXuUiOMcTOymw1zJ9a3iXGk1bUPmNNZ/ldW HZRcFCxoab/xsW84tFJ48f75rLq4KwWSVDQcB28mwTXlo0wljs+VqVlb/sb1sa8YR26y ER2Shh/h3CW/7QypvXYIIlWP3rkA1DJNviOa1h57Ok8I2PrldT+WJM/xTQDMKvO3Nqcv c2Yxu7kmqrfMh2tz5GJshGCVYBHcpEHU1tHn8KCxxHrtsQgQPsu/SUwVQrUi5X+GWZmF jNtA== X-Gm-Message-State: ALoCoQmMgjePtfD8k7zrFS6goEB+mB0eMYE6hXDHGRXLmPBVX+lQeUb2PMLmxQra8GBWEWozMjFb X-Received: by 10.152.6.103 with SMTP id z7mr574104laz.8.1438331961054; Fri, 31 Jul 2015 01:39:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.116.36 with SMTP id jt4ls284557lab.4.gmail; Fri, 31 Jul 2015 01:39:20 -0700 (PDT) X-Received: by 10.112.35.229 with SMTP id l5mr1673574lbj.0.1438331960616; Fri, 31 Jul 2015 01:39:20 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id b8si2989940lbg.101.2015.07.31.01.39.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jul 2015 01:39:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by lacct8 with SMTP id ct8so6611619lac.2 for ; Fri, 31 Jul 2015 01:39:20 -0700 (PDT) X-Received: by 10.112.158.4 with SMTP id wq4mr1612065lbb.106.1438331960027; Fri, 31 Jul 2015 01:39:20 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp227148lba; Fri, 31 Jul 2015 01:39:18 -0700 (PDT) X-Received: by 10.67.5.103 with SMTP id cl7mr1441450pad.75.1438331958060; Fri, 31 Jul 2015 01:39:18 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zc8si8819494pac.59.2015.07.31.01.39.16; Fri, 31 Jul 2015 01:39:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752826AbbGaIjL (ORCPT + 28 others); Fri, 31 Jul 2015 04:39:11 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:33018 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751562AbbGaIjE (ORCPT ); Fri, 31 Jul 2015 04:39:04 -0400 Received: by padck2 with SMTP id ck2so37639856pad.0 for ; Fri, 31 Jul 2015 01:39:03 -0700 (PDT) X-Received: by 10.66.222.161 with SMTP id qn1mr4548849pac.66.1438331943703; Fri, 31 Jul 2015 01:39:03 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id bg7sm6271488pdb.29.2015.07.31.01.39.02 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 31 Jul 2015 01:39:03 -0700 (PDT) From: Viresh Kumar To: akpm@linux-foundation.org Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Viresh Kumar Subject: [PATCH 01/15] err.h: add (missing) unlikely() to IS_ERR_OR_NULL() Date: Fri, 31 Jul 2015 14:08:21 +0530 Message-Id: <8eb64d6fff868c37ea09b9118bfe954206a6e317.1438331416.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , IS_ERR_VALUE() already contains it and so we need to add this only to the !ptr check. That will allow users of IS_ERR_OR_NULL(), to not add this compiler flag. Signed-off-by: Viresh Kumar --- include/linux/err.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/err.h b/include/linux/err.h index a729120644d5..56762ab41713 100644 --- a/include/linux/err.h +++ b/include/linux/err.h @@ -37,7 +37,7 @@ static inline bool __must_check IS_ERR(__force const void *ptr) static inline bool __must_check IS_ERR_OR_NULL(__force const void *ptr) { - return !ptr || IS_ERR_VALUE((unsigned long)ptr); + return unlikely(!ptr) || IS_ERR_VALUE((unsigned long)ptr); } /**