From patchwork Mon Aug 10 06:12:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 52129 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 9EB0220539 for ; Mon, 10 Aug 2015 06:14:43 +0000 (UTC) Received: by labia3 with SMTP id ia3sf35643743lab.1 for ; Sun, 09 Aug 2015 23:14:42 -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=KvET2alj2cGrMyjisWlJABzMK/aYnuHvAmLi/+0UFLY=; b=D21YLirgVMVbUfgfmcftpc+sGFvKtHfXpFYcps2O3rAITLzPzbvzPC+8JKSaR4moWL ISKpX4IGVK915VfCwddGLxVDBPTxXjRKm9TsIdDRX5NGtEV9f5zGczsz6ILDuwCZEhOZ tAxEentE7M+KQkqxbcsjmimc3k4bOlLbYqOsyBDdSoOGtBdq/aL1z4Me5tPLT8WCWnmT auq3sYgK58pRznCjxaFj12vyMl+iXk7gVkf2AVpyxn0THAjuYIMQdKfXirXMgQ9wiLrh xizvPWdhHUmNUiIXqwTPcNFs5PuAbDoYhe0nu7tGd4OciMVm2RU0PloukyefI0Q+JhGk HdYQ== X-Gm-Message-State: ALoCoQmFEl8ooDFAcazO5UbjmRDHSaRO8NaBgS6Grd/Eb9WtilMtaCRXo1SRF85+ekdKzDLFhgUS X-Received: by 10.152.115.196 with SMTP id jq4mr5786314lab.1.1439187282596; Sun, 09 Aug 2015 23:14:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.51 with SMTP id t19ls477193lal.22.gmail; Sun, 09 Aug 2015 23:14:42 -0700 (PDT) X-Received: by 10.112.137.164 with SMTP id qj4mr18611705lbb.105.1439187282418; Sun, 09 Aug 2015 23:14:42 -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 x3si13415443lad.77.2015.08.09.23.14.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Aug 2015 23:14:42 -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 labd1 with SMTP id d1so34561311lab.1 for ; Sun, 09 Aug 2015 23:14:42 -0700 (PDT) X-Received: by 10.152.26.163 with SMTP id m3mr18718267lag.86.1439187282294; Sun, 09 Aug 2015 23:14:42 -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 l6csp1739559lba; Sun, 9 Aug 2015 23:14:41 -0700 (PDT) X-Received: by 10.66.65.234 with SMTP id a10mr41478598pat.2.1439187281010; Sun, 09 Aug 2015 23:14:41 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ep11si6170494pac.239.2015.08.09.23.14.39; Sun, 09 Aug 2015 23:14:41 -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 S1753927AbbHJGOi (ORCPT + 28 others); Mon, 10 Aug 2015 02:14:38 -0400 Received: from mail-pd0-f172.google.com ([209.85.192.172]:34702 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753786AbbHJGOc (ORCPT ); Mon, 10 Aug 2015 02:14:32 -0400 Received: by pdbfa8 with SMTP id fa8so27639867pdb.1 for ; Sun, 09 Aug 2015 23:14:32 -0700 (PDT) X-Received: by 10.70.90.193 with SMTP id by1mr41165845pdb.80.1439187272189; Sun, 09 Aug 2015 23:14:32 -0700 (PDT) Received: from localhost ([223.227.137.11]) by smtp.gmail.com with ESMTPSA id to5sm18594989pac.33.2015.08.09.23.14.29 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 09 Aug 2015 23:14:31 -0700 (PDT) From: Viresh Kumar To: akpm@linux-foundation.org Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Viresh Kumar , Hans Ulli Kroll , adi-buildroot-devel@lists.sourceforge.net (moderated list:BLACKFIN RTC DRIVER), Alessandro Zummo , Alexandre Belloni , linux-arm-kernel@lists.infradead.org (moderated list:ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE), rtc-linux@googlegroups.com (open list:REAL TIME CLOCK (RTC) SUBSYSTEM) Subject: [PATCH V1 Resend 07/11] drivers: rtc: Drop (un)likely before IS_ERR(_OR_NULL) Date: Mon, 10 Aug 2015 11:42:29 +0530 Message-Id: <2ea7e46d3a63b1229889b1e8f0a9976725578189.1439187003.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.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(_OR_NULL) already contain an 'unlikely' compiler flag and there is no need to do that again from its callers. Drop it. gemini driver was using likely() for a failure case while the rtc driver is getting registered. That looks wrong and it should really be unlikely. But because we are killing all the unlikely() flags, lets kill that too. Acked-by: Hans Ulli Kroll (gemini) Signed-off-by: Viresh Kumar --- drivers/rtc/interface.c | 2 +- drivers/rtc/rtc-bfin.c | 2 +- drivers/rtc/rtc-gemini.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 11b639067312..5836751b8203 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c @@ -564,7 +564,7 @@ enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer) void rtc_update_irq(struct rtc_device *rtc, unsigned long num, unsigned long events) { - if (unlikely(IS_ERR_OR_NULL(rtc))) + if (IS_ERR_OR_NULL(rtc)) return; pm_stay_awake(rtc->dev.parent); diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c index 3d44b11721ea..535a5f9338d0 100644 --- a/drivers/rtc/rtc-bfin.c +++ b/drivers/rtc/rtc-bfin.c @@ -361,7 +361,7 @@ static int bfin_rtc_probe(struct platform_device *pdev) /* Register our RTC with the RTC framework */ rtc->rtc_dev = devm_rtc_device_register(dev, pdev->name, &bfin_rtc_ops, THIS_MODULE); - if (unlikely(IS_ERR(rtc->rtc_dev))) + if (IS_ERR(rtc->rtc_dev)) return PTR_ERR(rtc->rtc_dev); /* Grab the IRQ and init the hardware */ diff --git a/drivers/rtc/rtc-gemini.c b/drivers/rtc/rtc-gemini.c index 35f4486738fc..2fed93e1114a 100644 --- a/drivers/rtc/rtc-gemini.c +++ b/drivers/rtc/rtc-gemini.c @@ -148,7 +148,7 @@ static int gemini_rtc_probe(struct platform_device *pdev) rtc->rtc_dev = rtc_device_register(pdev->name, dev, &gemini_rtc_ops, THIS_MODULE); - if (likely(IS_ERR(rtc->rtc_dev))) + if (IS_ERR(rtc->rtc_dev)) return PTR_ERR(rtc->rtc_dev); return 0;