Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3006507pxj; Sun, 23 May 2021 18:36:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9IUXod27MpP5yDIC/jc1Kozoa0gTCABNpvmPCYf8CAql/3AS8DbeSN9hFu5Ks02Jjx+MY X-Received: by 2002:a6b:c30f:: with SMTP id t15mr10910982iof.17.1621820181240; Sun, 23 May 2021 18:36:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621820181; cv=none; d=google.com; s=arc-20160816; b=PpA1c01plJyeYmXCBcJ7T8DiSaoHtPulyMBEXyVXecgEWACP8qfH/9a0nSLP98HAIC sWHq1iD+/G4Gfmg5119NwH8lNmfYxoFpU1TjM5Ppjb6FREaJHYQKP5ymX+36qVnBq1xk FrePmhMuyiT28pKOa1mqzwCmmEKhwP+CGdeHba0u/+UHGe1iIhpEiDe+XvAwOs8s8stO UUgNW8cvJeyZ93hZtpMibwg7A9gqddn3R8iyXpF3GTApztvBMHFNmA0wDOTQKpOTKLO+ ehhmt9VmlcigCQBPEkUBldz8Pi6gDoqCz+5R4OQuzurJaH/qanjN4v7eHinwsVVbdpIy SVCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=f4b3d8mlVsZbzuD/p6kI8KE50QkWRLcMGak4bwZJPa0=; b=sFVmjXT5966OeIOUjSO8GgTHCQTXiev8bur+Km14wqvRjcpOqBfCG3aWq4/RFfQoT7 kdF5S9CNg5DFDJQ09POZZAMu+qWbJc9imjgch/PtwlAlB+5yQ9qHBiOcqYGgZMIy6y7t ttf5kvsR1M7SR6iKXWEozlVEjSC3jZB5uV/OLwyFwg3F4g3dhcyzl/vtLdFzfYS2Kmr5 yVa2/EJCdSE+mXSjvjvTtG6AYH4uH29ZNTKHjZhRt19qz/SdymuxxEFUMn54TaqB3i1j iloEByqOCoGuGVPl0+t9rtQL6QkL/Cc5dFWHbuZYevrE1JjsP+j/8pHZBTTg92fJOany 4DBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x6si998384ilv.59.2021.05.23.18.36.08; Sun, 23 May 2021 18:36:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232143AbhEXBfP (ORCPT + 99 others); Sun, 23 May 2021 21:35:15 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:5524 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232067AbhEXBfO (ORCPT ); Sun, 23 May 2021 21:35:14 -0400 Received: from dggems704-chm.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FpKRN1nYPzkYQT; Mon, 24 May 2021 09:30:56 +0800 (CST) Received: from dggpeml500017.china.huawei.com (7.185.36.243) by dggems704-chm.china.huawei.com (10.3.19.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 24 May 2021 09:33:43 +0800 Received: from [10.174.178.174] (10.174.178.174) by dggpeml500017.china.huawei.com (7.185.36.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 24 May 2021 09:33:42 +0800 Subject: Re: [PATCH -next] ARM: imx: add missing clk_disable_unprepare() in imx_mmdc_remove() To: Shawn Guo CC: , , References: <20210517111523.477889-1-yangyingliang@huawei.com> <20210523051145.GW8194@dragon> From: Yang Yingliang Message-ID: Date: Mon, 24 May 2021 09:33:42 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20210523051145.GW8194@dragon> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.174.178.174] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500017.china.huawei.com (7.185.36.243) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/5/23 13:11, Shawn Guo wrote: > On Mon, May 17, 2021 at 07:15:23PM +0800, Yang Yingliang wrote: >> clock source is prepared and enabled by clk_prepare_enable() >> in probe function, but no disable or unprepare in remove. >> >> Fixes: 9454a0caff6a ("ARM: imx: add mmdc ipg clock operation for mmdc") >> Reported-by: Hulk Robot >> Signed-off-by: Yang Yingliang >> --- >> arch/arm/mach-imx/mmdc.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c >> index 0dfd0ae7a63d..7d87fa8c70a9 100644 >> --- a/arch/arm/mach-imx/mmdc.c >> +++ b/arch/arm/mach-imx/mmdc.c >> @@ -77,6 +77,7 @@ static const struct of_device_id imx_mmdc_dt_ids[] = { >> { /* sentinel */ } >> }; >> >> +struct clk *mmdc_ipg_clk; > Missing static. But an even better change should be putting it into > struct mmdc_pmu, I guess. OK, I will send a v2 later. Thanks, Yang > > Shawn > >> #ifdef CONFIG_PERF_EVENTS >> >> static enum cpuhp_state cpuhp_mmdc_state; >> @@ -463,6 +464,7 @@ static int imx_mmdc_remove(struct platform_device *pdev) >> cpuhp_state_remove_instance_nocalls(cpuhp_mmdc_state, &pmu_mmdc->node); >> perf_pmu_unregister(&pmu_mmdc->pmu); >> kfree(pmu_mmdc); >> + clk_disable_unprepare(mmdc_ipg_clk); >> return 0; >> } >> >> @@ -536,7 +538,6 @@ static int imx_mmdc_probe(struct platform_device *pdev) >> { >> struct device_node *np = pdev->dev.of_node; >> void __iomem *mmdc_base, *reg; >> - struct clk *mmdc_ipg_clk; >> u32 val; >> int err; >> >> -- >> 2.25.1 >> > .