Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2394603pxj; Sat, 22 May 2021 22:12:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLkJ2mG0gUBMyZ4G9sk9FRHYkSAVHu6ePCDYK/hF9Il4qKe1v33Jg4BoosD3IBk1DPENCL X-Received: by 2002:a02:866a:: with SMTP id e97mr16231632jai.136.1621746774199; Sat, 22 May 2021 22:12:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621746774; cv=none; d=google.com; s=arc-20160816; b=PXhhapjz71/DGSM7cVHbn9mKktEqvdYbk9fgk6sGdcso1KhDsLPW/+SXh7R/6ZACoS BLhVYrREUn2yQLkSWcLF/7ZeSuvCwjNMdvEpiT8B1pg/50795s6Lcw7DxO3HSmBcxguQ SXl0aVgOAM6W84En8Luhbx/mDe3OeO+Z1S6CnrVClFCVuFGvIhP4B5OGRe7vnjw1n8SL DocOdMjKar1kqEqwisXsryUBVShMRCialCxAczacwOCdN2FqVDWv3C4876fxNYnN4LM0 ovFmF5dbuWCvEVP6Siz3LJBiICw6HqIb8QNc6XOGisn5/v9Wdz3Z0rtqZTBb3J7DH0Az 601w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=4AEanU6hhy0eJ1kE3zHsF4fLqCkL8nm9enka3L4kjXQ=; b=yvMEh6QSdX4O6wGBsQgVn0URLLEhOpm6AA2VbW93k5EPWQMgLNYxASTCZ5bqtFPCDe zyO/HZgo8X7KOawhAVQCHbMibYkImmPJkrLJYHIIL/GyIzX5VgOvKmz61AMT9DoxZ5YA sDyXXUYUqWl23Ww6TvXo61KHE1HyeIVJJzrGEq6VVyTdsRtxP+2LsSwDPYtfR57sfEOu SYqXhas86f//cTaIISDCpcK7Lm6WFyBGE1VoSOKcXGwqgfwpYihuCny0SLcPNiCYQRn0 g5/SpL4brXSTNy9Cn+rWSmnYPZKf5XLh7adNlrV0hOzLhYeDPPz5T4uSwYZz6VpXyx1O oQvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Wy2jgXlW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o8si11276858ilu.133.2021.05.22.22.12.41; Sat, 22 May 2021 22:12:54 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Wy2jgXlW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231551AbhEWFNQ (ORCPT + 99 others); Sun, 23 May 2021 01:13:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:50610 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229895AbhEWFNQ (ORCPT ); Sun, 23 May 2021 01:13:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8EC3961175; Sun, 23 May 2021 05:11:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621746710; bh=JzbkgxHVP+qyg6EWN9dyTFjhQejudhV0HgHDOpVmfgM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Wy2jgXlWFk1fWIWJOepwyGf+2J5zWqRMda7EP+JHTL07lONVDpJCIrRXcWZTC6yeH 93MHuJQQ8eAyKSz/brX0JlAxluq4r+Y7QL4OgTT+HVoNet8rOxUVqj34FbVG+C5sy/ etuUmeleCqm3mRomjUozCT3IBan/N10W4l7DiemCs0X/v03Rnlmlp8Q6wbiTW0+rYG r2qQ7isgCpH+pp+L8OfF0EWxEHHPFw7uf27UkHbQ+MXcyN2WcJjkVhq6dYD/NiEgP1 qX8OqOjaDlZubuunxTVIullceLg2k1tCqFi1VF1hKjGN6eA44rpUTe/d5BR9R5ctAz Wn7R4FkNk9yvQ== Date: Sun, 23 May 2021 13:11:46 +0800 From: Shawn Guo To: Yang Yingliang Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com Subject: Re: [PATCH -next] ARM: imx: add missing clk_disable_unprepare() in imx_mmdc_remove() Message-ID: <20210523051145.GW8194@dragon> References: <20210517111523.477889-1-yangyingliang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210517111523.477889-1-yangyingliang@huawei.com> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 >