From patchwork Mon Aug 10 06:12:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 52123 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id 5255620539 for ; Mon, 10 Aug 2015 06:13:04 +0000 (UTC) Received: by wicul11 with SMTP id ul11sf35411029wic.1 for ; Sun, 09 Aug 2015 23:13:03 -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=hlMTbqlw3eWxfRcQXYyTgYGyyxrGu5UFlQ0UKkrUIBMU4MHojJTIItVnLOxZWbC8VS 0uHth7Hvn24waPGuGdaZR4pMMa0YzkmG63vUcBQ4rsrgCibNeZSNB7Hnwrwz+CoF2Hr9 8Ako6L4D/75EUha0zfrHX2E3VSJzN9wDB9ybxFaIIMfs36/01+IhO5ki/Ruhj+kfKTKh wYmfKHh4bMq04yERB+j8U/8CC1K9/4yo10HEspRdlEoyJ89FYgb7GSmRUKWAfOl9zB1R tIM0y3DzC4nTWLO52LQYaNlYVi/5z8hEYIclFjqIYY68GjY+yrXvTsZ5h4CbfuetqeQF NJ3g== X-Gm-Message-State: ALoCoQmSlKMsKF1z1xRRjPNQcKyVZGJmEPnLxNcyJGR0/CYJgz7cOdLMcY6/EiLVWlACYikh/3Mx X-Received: by 10.152.182.226 with SMTP id eh2mr5796668lac.0.1439187183560; Sun, 09 Aug 2015 23:13:03 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.10.33 with SMTP id f1ls747493lab.49.gmail; Sun, 09 Aug 2015 23:13:03 -0700 (PDT) X-Received: by 10.112.147.201 with SMTP id tm9mr18695411lbb.40.1439187183254; Sun, 09 Aug 2015 23:13:03 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id vs3si9260731lac.153.2015.08.09.23.13.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Aug 2015 23:13:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by lalv9 with SMTP id v9so5452285lal.0 for ; Sun, 09 Aug 2015 23:13:02 -0700 (PDT) X-Received: by 10.152.203.134 with SMTP id kq6mr18852316lac.106.1439187182703; Sun, 09 Aug 2015 23:13:02 -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 l6csp1738989lba; Sun, 9 Aug 2015 23:13:01 -0700 (PDT) X-Received: by 10.69.1.102 with SMTP id bf6mr41689262pbd.17.1439187181147; Sun, 09 Aug 2015 23:13:01 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ep1si31317489pbd.256.2015.08.09.23.12.59; Sun, 09 Aug 2015 23:13:01 -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 S1753471AbbHJGM5 (ORCPT + 28 others); Mon, 10 Aug 2015 02:12:57 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:35575 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753043AbbHJGMz (ORCPT ); Mon, 10 Aug 2015 02:12:55 -0400 Received: by pacgr6 with SMTP id gr6so19577346pac.2 for ; Sun, 09 Aug 2015 23:12:54 -0700 (PDT) X-Received: by 10.68.238.231 with SMTP id vn7mr41692116pbc.38.1439187174684; Sun, 09 Aug 2015 23:12:54 -0700 (PDT) Received: from localhost ([223.227.137.11]) by smtp.gmail.com with ESMTPSA id p9sm18468326pds.92.2015.08.09.23.12.53 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 09 Aug 2015 23:12:54 -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 V1 Resend 01/11] err.h: add (missing) unlikely() to IS_ERR_OR_NULL() Date: Mon, 10 Aug 2015 11:42:23 +0530 Message-Id: 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.44 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); } /**