From patchwork Wed Aug 12 10:29:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 52334 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id 07A9722ED0 for ; Wed, 12 Aug 2015 10:30:24 +0000 (UTC) Received: by labd1 with SMTP id d1sf4405450lab.0 for ; Wed, 12 Aug 2015 03:30:23 -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=rCXo9mmC4ownyoIOdmQpFLW9YOdcKqn/mGo04/uWHMc=; b=QRvsqcASL4N6sn6ntN3mHD9heeorlIjD0EXPah7Hy1BMGCrbhU3GzzdJetoRgPnCvT fInY7il79Xsn8wjh/sAJI391VqkOBMzZU6dARu6H38cNgvHHXD20fJNkK3SFKMul4iVJ gnLrdNhagx0E9NsHCWAdoGj3SvtTnhjcHG25MsEjY5DG+ykUQe//Hz9WwJczLcBphazt 0ws8/vUdx0+ofmcStSP8LDQSt0OBFfJw1M4nhcqdeoLj2OKmRFxaIWE8CfQmSnfG4lT3 rInv3B7PE1dnf0REqgZNEuEmReaT659dFIf/Z5DiStG5bPbi0TrBjT/XZR38FbVpebQ/ CUzA== X-Gm-Message-State: ALoCoQlMjkTP3clarQQTafflZpR44Ctm4TFThRSO/6BurNQw8oRCsAUNN6qYeELBhO+gJlOgl22k X-Received: by 10.112.119.166 with SMTP id kv6mr8278696lbb.3.1439375423902; Wed, 12 Aug 2015 03:30:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.99 with SMTP id p3ls22467laj.57.gmail; Wed, 12 Aug 2015 03:30:23 -0700 (PDT) X-Received: by 10.112.72.8 with SMTP id z8mr31359122lbu.24.1439375423478; Wed, 12 Aug 2015 03:30:23 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id s8si3804531laa.81.2015.08.12.03.30.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Aug 2015 03:30:23 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lagz9 with SMTP id z9so6573700lag.3 for ; Wed, 12 Aug 2015 03:30:23 -0700 (PDT) X-Received: by 10.112.176.228 with SMTP id cl4mr31572284lbc.106.1439375423340; Wed, 12 Aug 2015 03:30:23 -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 l6csp234396lba; Wed, 12 Aug 2015 03:30:21 -0700 (PDT) X-Received: by 10.68.143.40 with SMTP id sb8mr65117713pbb.21.1439375420706; Wed, 12 Aug 2015 03:30:20 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t6si8812446pdo.81.2015.08.12.03.30.19; Wed, 12 Aug 2015 03:30:20 -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 S934236AbbHLKaM (ORCPT + 28 others); Wed, 12 Aug 2015 06:30:12 -0400 Received: from mail-pd0-f181.google.com ([209.85.192.181]:33075 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933894AbbHLKaH (ORCPT ); Wed, 12 Aug 2015 06:30:07 -0400 Received: by pdrh1 with SMTP id h1so6088659pdr.0 for ; Wed, 12 Aug 2015 03:30:06 -0700 (PDT) X-Received: by 10.70.93.36 with SMTP id cr4mr2255460pdb.101.1439375406418; Wed, 12 Aug 2015 03:30:06 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id e8sm5914957pdm.13.2015.08.12.03.30.05 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 12 Aug 2015 03:30:05 -0700 (PDT) From: Viresh Kumar To: trivial@kernel.org Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Viresh Kumar , Pavel Machek , Greg Kroah-Hartman , Len Brown , linux-pm@vger.kernel.org (open list:SUSPEND TO RAM), "Rafael J. Wysocki" Subject: [PATCH V1 Resend 02/10] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL) Date: Wed, 12 Aug 2015 15:59:39 +0530 Message-Id: <455a29a594b92b9ba06b14249d8f61a7ffbbecc1.1439375087.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.43 as permitted sender) smtp.mailfrom=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(_OR_NULL) already contain an 'unlikely' compiler flag and there is no need to do that again from its callers. Drop it. Acked-by: Pavel Machek Signed-off-by: Viresh Kumar --- drivers/base/power/opp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c index 51b220e615d3..97c31170437d 100644 --- a/drivers/base/power/opp.c +++ b/drivers/base/power/opp.c @@ -204,7 +204,7 @@ static struct device_opp *_find_device_opp(struct device *dev) { struct device_opp *dev_opp; - if (unlikely(IS_ERR_OR_NULL(dev))) { + if (IS_ERR_OR_NULL(dev)) { pr_err("%s: Invalid parameters\n", __func__); return ERR_PTR(-EINVAL); } @@ -239,7 +239,7 @@ unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp) opp_rcu_lockdep_assert(); tmp_opp = rcu_dereference(opp); - if (unlikely(IS_ERR_OR_NULL(tmp_opp)) || !tmp_opp->available) + if (IS_ERR_OR_NULL(tmp_opp) || !tmp_opp->available) pr_err("%s: Invalid parameters\n", __func__); else v = tmp_opp->u_volt; @@ -271,7 +271,7 @@ unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp) opp_rcu_lockdep_assert(); tmp_opp = rcu_dereference(opp); - if (unlikely(IS_ERR_OR_NULL(tmp_opp)) || !tmp_opp->available) + if (IS_ERR_OR_NULL(tmp_opp) || !tmp_opp->available) pr_err("%s: Invalid parameters\n", __func__); else f = tmp_opp->rate;