From patchwork Fri Jul 31 10:53: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: 51766 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by patches.linaro.org (Postfix) with ESMTPS id 8AEB122A8D for ; Fri, 31 Jul 2015 10:54:11 +0000 (UTC) Received: by wixh2 with SMTP id h2sf7261228wix.0 for ; Fri, 31 Jul 2015 03:54:10 -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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=ZLQ4HSpV4wLRBCauZWC0zBXVPEaq0RUzyByBHrlGTAE=; b=lHU3a+EgDNNZKF4h0yK4TG2I6/s4QXfZJB78Kh05klQaPb96AbWxQ/cgKzankjB9W4 PwVimUzvdoOVzN+bWPvozC7RIdzHfTUHzBamhEXhTDE6tUURClDoPL8jQjFYzr5WUGSm 81w3/vuPGgotTT4RxPXH0NiL6C1Vee1PhJuTOCBSSzl9KVJt9RHem9mYY04htjQeEgMb NujOsmVatKgb1P7lh9fUO7x5BMUamWAO/r2NtO9vaNQWPS/spq+ZmB0+QPKmWRUSrH5z I01jTWPsEdo3C+fNnJpFAlY5Zr5XMafsaLdjr5sLJKWwzM3Kmgv/8o9gUJ0h/DgwCN5s cQsA== X-Gm-Message-State: ALoCoQlm9H+iKERi9CKPa2cRM4VrBexvLYX/drl1cjPenaLX6xL7AaqumFcJiMC3RUEMon3hvm6j X-Received: by 10.112.54.166 with SMTP id k6mr752524lbp.0.1438340050779; Fri, 31 Jul 2015 03:54:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.7 with SMTP id v7ls297667laa.107.gmail; Fri, 31 Jul 2015 03:54:10 -0700 (PDT) X-Received: by 10.152.8.38 with SMTP id o6mr2176188laa.116.1438340050604; Fri, 31 Jul 2015 03:54:10 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id wn2si3302679lac.93.2015.07.31.03.54.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jul 2015 03:54:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by lafd3 with SMTP id d3so41751676laf.1 for ; Fri, 31 Jul 2015 03:54:10 -0700 (PDT) X-Received: by 10.112.126.101 with SMTP id mx5mr2186793lbb.35.1438340050235; Fri, 31 Jul 2015 03:54:10 -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 l6csp301669lba; Fri, 31 Jul 2015 03:54:08 -0700 (PDT) X-Received: by 10.70.102.209 with SMTP id fq17mr5637878pdb.77.1438340045697; Fri, 31 Jul 2015 03:54:05 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id al7si9504611pad.160.2015.07.31.03.54.03; Fri, 31 Jul 2015 03:54:05 -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 S1751294AbbGaKyD (ORCPT + 28 others); Fri, 31 Jul 2015 06:54:03 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:34576 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750789AbbGaKyA (ORCPT ); Fri, 31 Jul 2015 06:54:00 -0400 Received: by pdbbh15 with SMTP id bh15so40772813pdb.1 for ; Fri, 31 Jul 2015 03:54:00 -0700 (PDT) X-Received: by 10.70.92.7 with SMTP id ci7mr5758232pdb.34.1438340040340; Fri, 31 Jul 2015 03:54:00 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id ni14sm7065158pdb.11.2015.07.31.03.53.59 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 31 Jul 2015 03:53:59 -0700 (PDT) From: Viresh Kumar To: akpm@linux-foundation.org Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Viresh Kumar , adi-buildroot-devel@lists.sourceforge.net (moderated list:BLACKFIN RTC DRIVER), Alessandro Zummo , Alexandre Belloni , Hans Ulli Kroll , 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 9/15 V2] drivers: rtc: Drop (un)likely before IS_ERR(_OR_NULL) Date: Fri, 31 Jul 2015 16:23:43 +0530 Message-Id: X-Mailer: git-send-email 2.4.0 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.53 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. Signed-off-by: Viresh Kumar --- V1->V2: - Removed the likely() part from gemini driver and the changelog wasn't updated to match that. Fixed the changelog now. 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;