From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3B8034DCD6 for ; Thu, 2 Jul 2026 08:28:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782980901; cv=none; b=lQxhOELi+dwH1VyVTJVBNVAexz6DxZBU53RgIGQcTpQN/cj70t6jt4us3WZM2k0IPRHR+8vXIu0Jt0g/1l9SqPlZzVX2oAR6pkU40IT3iJWVqpnBs0y0bJT0qWzA1BMJvNYvbLn24xMMdJgKMYnOTEriwJB9fX1BlNG+Dt16/K4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782980901; c=relaxed/simple; bh=4uwRXUUaqg2LeGraF1sC1rIcMEkH9EPqVnUDYuI36uM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RJAyQyLGWkSMYX5dW1+l4C/etyFgF8NOFwwEM40nJhlRy9Jw3sQ+s8FJUw4LY1TKSibzqubG98IY3zbjRDYatCl6Lr0ImjHYp7RMX0td5Q0kC+tg/K2arAv2R1VlU6Jd9v6qis/zr6gfpP3ridn6ZRWFWCdbitHDkAFD8uuEDOA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=JOEiNkJL; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="JOEiNkJL" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 83E001476; Thu, 2 Jul 2026 01:28:14 -0700 (PDT) Received: from localhost (unknown [10.2.196.114]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7EAF03F905; Thu, 2 Jul 2026 01:28:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1782980898; bh=4uwRXUUaqg2LeGraF1sC1rIcMEkH9EPqVnUDYuI36uM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JOEiNkJLrf6wAP5HQ7kzLtcNLcAMFPURoGojkjfq+OPYfgatn8K+BcxT/IiIyLQuQ YApz4P5J6fx4nJcVgLYygC2tRIjfEhARRy9xNfLn6q3CQlV5S2i4ZMwPUP6Hip1juK GT6xSNPLnC2lv+N1Bg36xHSq+DF6TiHXDXWc0zZ8= Date: Thu, 2 Jul 2026 09:28:16 +0100 From: Leo Yan To: Jie Gan Cc: Suzuki K Poulose , Mike Leach , James Clark , Alexander Shishkin , Anshuman Khandual , Yeoreum Yun , Yuanfang Zhang , Maxime Coquelin , Alexandre Torgue , Tingwei Zhang , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [PATCH 1/2] coresight: Fix clock refcount imbalance on platform remove Message-ID: <20260702082816.GH1812158@e132581.arm.com> References: <20260701-fix-clock-refcount-unbalance-v1-0-321dc63c1f90@oss.qualcomm.com> <20260701-fix-clock-refcount-unbalance-v1-1-321dc63c1f90@oss.qualcomm.com> <20260701162321.GG1812158@e132581.arm.com> <5218878b-c91f-4d14-ba12-68edf7b3f4a7@oss.qualcomm.com> <4e41e58e-5fbf-4564-bf9e-cec42570f3d5@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4e41e58e-5fbf-4564-bf9e-cec42570f3d5@oss.qualcomm.com> On Thu, Jul 02, 2026 at 09:56:05AM +0800, Jie Gan wrote: > static void funnel_platform_remove(struct platform_device *pdev) > { > struct funnel_drvdata *drvdata = dev_get_drvdata(&pdev->dev); > > if (WARN_ON(!drvdata)) > return; > > - funnel_remove(&pdev->dev); > + /* > + * Resume the device so its clocks are enabled again, balancing the > + * clk_disable_unprepare() that devm runs when the driver detaches. > + * Then mark it suspended and drop the usage count taken here. > + */ > pm_runtime_get_sync(&pdev->dev); > + funnel_remove(&pdev->dev); > pm_runtime_disable(&pdev->dev); > + pm_runtime_set_suspended(&pdev->dev); > + pm_runtime_put_noidle(&pdev->dev); LGTM. Thanks for writing up the comment. Please proceed.