From patchwork Wed Aug 12 10:29:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 52341 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 D9AC822ED0 for ; Wed, 12 Aug 2015 10:32:29 +0000 (UTC) Received: by lbck9 with SMTP id k9sf4285674lbc.0 for ; Wed, 12 Aug 2015 03:32:28 -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=XeZ4KnGjgPXtI4eoARlt/YDCSzBeGiZKGEpYnGvt7Qj1AtkfiCzjeDIDLqhnew8OiG lOMuuZOgskU7DTFP7t6jda5UNys+LsKn9H6E9VhlGsf1cApq3ZbIpr7gcp+wgpayV0DH hRvwihB9RiWh9q/zBGGfhV0Oc2mOMjt7BzOWy4yWKEDo8lnHnaKQRzlBrorXdOG92HRW h/lzX1isI0JYXWPowoBgxhDrloxc+knaZKv5bGuQdbZjctmS+VHmw/dhUsLPNWf6Aear wL9aFZt9nQpzpkz20FNFjYUrmiuFBCbhiV5pbzjK6K5J0Au+/PXuJdk6ByqsfKsTASIv 6ZOQ== X-Gm-Message-State: ALoCoQlcXN4VmK6bbUXSrcLClmpXtPZOZRzMNuPfR47N3CeYoihpGIh4kWOKnnuaYfUeLPx8Kd47 X-Received: by 10.112.189.105 with SMTP id gh9mr4120929lbc.16.1439375548928; Wed, 12 Aug 2015 03:32:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.36 with SMTP id y4ls29008lag.7.gmail; Wed, 12 Aug 2015 03:32:28 -0700 (PDT) X-Received: by 10.112.62.133 with SMTP id y5mr27297376lbr.120.1439375548750; Wed, 12 Aug 2015 03:32:28 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id qb5si3818141lbb.28.2015.08.12.03.32.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Aug 2015 03:32:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbbtg9 with SMTP id tg9so6989719lbb.1 for ; Wed, 12 Aug 2015 03:32:28 -0700 (PDT) X-Received: by 10.152.29.132 with SMTP id k4mr11319671lah.88.1439375548607; Wed, 12 Aug 2015 03:32:28 -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 l6csp235514lba; Wed, 12 Aug 2015 03:32:27 -0700 (PDT) X-Received: by 10.68.218.104 with SMTP id pf8mr66187233pbc.31.1439375546570; Wed, 12 Aug 2015 03:32:26 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bf1si8830903pdb.46.2015.08.12.03.32.25; Wed, 12 Aug 2015 03:32:26 -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 S934405AbbHLKcY (ORCPT + 28 others); Wed, 12 Aug 2015 06:32:24 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:36251 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934285AbbHLKa0 (ORCPT ); Wed, 12 Aug 2015 06:30:26 -0400 Received: by pacrr5 with SMTP id rr5so11940795pac.3 for ; Wed, 12 Aug 2015 03:30:24 -0700 (PDT) X-Received: by 10.68.248.102 with SMTP id yl6mr66942979pbc.66.1439375424746; Wed, 12 Aug 2015 03:30:24 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id pu7sm1865097pdb.94.2015.08.12.03.30.23 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 12 Aug 2015 03:30:24 -0700 (PDT) From: Viresh Kumar To: trivial@kernel.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 06/10] drivers: rtc: Drop (un)likely before IS_ERR(_OR_NULL) Date: Wed, 12 Aug 2015 15:59:43 +0530 Message-Id: <1a92f2e1af5309ece9736f79f312e90486a98825.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.217.180 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. 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;