Received: by 10.213.65.68 with SMTP id h4csp239145imn; Fri, 23 Mar 2018 03:39:30 -0700 (PDT) X-Google-Smtp-Source: AG47ELvl4cIIw2VuNz+2psHvN7SmYVC+ci5uzKLJpJXoo5aoVx+soThGf+NWOpqZIiKvudnChjll X-Received: by 2002:a17:902:1e2:: with SMTP id b89-v6mr17033463plb.389.1521801570495; Fri, 23 Mar 2018 03:39:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521801570; cv=none; d=google.com; s=arc-20160816; b=XziVsfr9NLrMGherhNYr7xuC1OawWDUpr5E0xrkbobOqSAdIHXsuABZySRV5/5nwu6 mkFEuqdWQG0aAwOBnEVjf+ID+Wb/fY1KmpWyCKbJdpSyRo6HwM7jh66p3i/afmdJbOBT ftlVih71YV+kEvwdH3fL5XsjWNnhl0CJLr5aZUCyi86vTNKZZ1fumi2RPrqGtmASV9gp qqoeCf2Fl+KqthV8ULJeBXcqH6nkr7sJLK7ZNAyoPx+vx0JkyIDds+8Aqf95sml46mQY hoDylxQkJM+9KRzAd3O/GqC4IS4cfwchDSokvs3cvgIJ28dN6iBS4YYN6YmCnCaR3V9l Dnyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=0NvV21LpixHlbE98Vhj4wMZjhShO+FvAoIleqfPKfDo=; b=DhRnavfUQK4sbmuxqpdvABmVBikHEKqEoDZ6dkPYU28YrBZ3TTtGERvVNTcVSeJSBM /BzLcLC89S5/hS2vVBW3oDRp55q8qLz8MSmiYAEPEDwA3cT68zt3qqLzJ2EDc1qeet1V jA7lqbaXJlmAtPrIckCxFaMMLojarRymhapmEYxIK+cxDv5IejRjrJjFDVbrU7Ynxf/3 zJvqWGSwwPl0UnHYgdvMJKROh/GOEWmZDJP4iddnSDSGxva5U9A8gY9MTXfd6TLzm0tc hA+j1e4W4RwuXd/0cZLyqx3jSIP+eeyXJL+RoMfM6GwMmWSVOse0dKYcLtdRGMI4IlUd ryog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t23-v6si4309074ply.482.2018.03.23.03.39.16; Fri, 23 Mar 2018 03:39:30 -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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756308AbeCWKiP (ORCPT + 99 others); Fri, 23 Mar 2018 06:38:15 -0400 Received: from mail.bootlin.com ([62.4.15.54]:42754 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756190AbeCWKiN (ORCPT ); Fri, 23 Mar 2018 06:38:13 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id B38BC203B1; Fri, 23 Mar 2018 11:38:10 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (242.171.71.37.rev.sfr.net [37.71.171.242]) by mail.bootlin.com (Postfix) with ESMTPSA id 50CAC2084D; Fri, 23 Mar 2018 11:38:00 +0100 (CET) Date: Fri, 23 Mar 2018 11:38:01 +0100 From: Alexandre Belloni To: sean.wang@mediatek.com Cc: robh+dt@kernel.org, mark.rutland@arm.com, sre@kernel.org, lee.jones@linaro.org, a.zummo@towertech.it, eddie.huang@mediatek.com, devicetree@vger.kernel.org, linux-rtc@vger.kernel.org, linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 08/16] rtc: mediatek: remove unnecessary irq_dispose_mapping Message-ID: <20180323103801.GH3417@piout.net> References: <96f39ce7f57a4dcd7653e049eebc87c83bcbdfc9.1521794177.git.sean.wang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <96f39ce7f57a4dcd7653e049eebc87c83bcbdfc9.1521794177.git.sean.wang@mediatek.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/03/2018 at 17:15:05 +0800, sean.wang@mediatek.com wrote: > From: Sean Wang > > It's unnecessary doing irq_dispose_mapping as a reverse operation for > platform_get_irq. > > Ususally, irq_dispose_mapping should be called in error path or module > removal to release the resources for irq_of_parse_and_map requested. > > Signed-off-by: Sean Wang > --- > drivers/rtc/rtc-mt6397.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/rtc/rtc-mt6397.c b/drivers/rtc/rtc-mt6397.c > index b62eaa8..cefb83b 100644 > --- a/drivers/rtc/rtc-mt6397.c > +++ b/drivers/rtc/rtc-mt6397.c > @@ -17,7 +17,6 @@ > #include > #include > #include > -#include > #include > #include > #include > @@ -336,7 +335,7 @@ static int mtk_rtc_probe(struct platform_device *pdev) > if (ret) { > dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n", > rtc->irq, ret); > - goto out_dispose_irq; > + return ret; > } > > device_init_wakeup(&pdev->dev, 1); > @@ -353,8 +352,7 @@ static int mtk_rtc_probe(struct platform_device *pdev) > > out_free_irq: > free_irq(rtc->irq, rtc->rtc_dev); > -out_dispose_irq: > - irq_dispose_mapping(rtc->irq); > + Don't you still have a irq_create_mapping? > return ret; > } > > @@ -364,7 +362,6 @@ static int mtk_rtc_remove(struct platform_device *pdev) > > rtc_device_unregister(rtc->rtc_dev); > free_irq(rtc->irq, rtc->rtc_dev); > - irq_dispose_mapping(rtc->irq); > > return 0; > } > -- > 2.7.4 > -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com