From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1DC412C11DE for ; Tue, 18 Aug 2026 20:33:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787085207; cv=none; b=c8fw0v5uGlgd175jFhJ0dNcHhky87WohNZtvZLr+9GvAE9tDGazLEz9dUsqv3ILYHVe0N38Qs3S5F+D1IhvFL37myltP7ZFo/5UeykWmteQ9I3p9l2FGR2bAF1dUkRjDTMh3StZyQRQfTOTp0DFE+FQ3F+YIQJuDgoJneSIlotM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787085207; c=relaxed/simple; bh=6EoBM8EKhH/N4JqjP/CbMRlPYBPGrcAyefj3Zkohp0M=; h=Message-ID:Date:MIME-Version:Subject:To:References:From:Cc: In-Reply-To:Content-Type; b=b3qOiDkE9iY7Vb1rCj9pphlfenmIvokJA20BpwIolrnm4zOjyDVgZLUGzQV0UGPFUry0z91V9Y6OzSQidKzC7wm+ZiZzvFEu9qUItXq/xUYQdCS1e3COMJVchEIgRTfB8ujxxfIJJKkowPEboaQA/qO1qH5PHsXj15fgHx7fGoE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=jLmDSfvj; arc=none smtp.client-ip=80.12.242.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="jLmDSfvj" Received: from [IPV6:2a01:cb10:785:b00:6128:9b8c:c203:905] ([10.64.95.102]) by smtp.orange.fr with ESMTP id wQMHwaDYbU5yFwQMHw3SyP; Tue, 18 Aug 2026 22:24:29 +0200 Received: from [IPV6:2a01:cb10:785:b00:6128:9b8c:c203:905] ([IPv6:2a01:cb10:785:b00:6128:9b8c:c203:905]) by smtp.orange.fr with ESMTPSA id wQM7wFEsssD2OwQM7wYuVH; Tue, 18 Aug 2026 22:24:20 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1787084660; bh=R1Yx6VcnaWYfsTAbnJfJaEPPi/LfJ6dUuzbZJzyubxk=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=jLmDSfvj3rXm4t1QYXIO+GFgzAvBZ+HZlrqbURndWQsTnKKscV2pjW9AFYk4ZxoMF nu619LYeRE8UWAoxNHrLbW4NrKqdtQoWHRofuTzPo33a9OtMcZrcJjix8lkp7WYYVx e5NubsoF24yEpI6p0xiYlmgIoqWW/LItgo/YMByfAb8qtR4DbF8BaV/ew6srlIeWOL kmeYycULiLnc86F/L5xMLeF4A8A/8WUD9I7AgJivNJ/nIsIsarWLhDcoQrGnMFWbTv nvpV0s506NNzvsMnAqJ9zt6HJcn69TwCnDqwL081wSiUi/ekLx2+h6LdnRWczY2ykC +DY4dRi2xrAfQ== X-ME-Helo: [IPV6:2a01:cb10:785:b00:6128:9b8c:c203:905] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 18 Aug 2026 22:24:20 +0200 X-ME-IP: 2a01:cb10:785:b00:6128:9b8c:c203:905 Message-ID: <7739adcb-4234-4e28-a010-bcb64605b5af@wanadoo.fr> Date: Tue, 18 Aug 2026 22:24:18 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] rtc: rtc-cadence: fix clock cleanup ordering To: Jiawen Liu <1298662399@qq.com>, linux-kernel@vger.kernel.org References: From: Christophe JAILLET Content-Language: en-US, fr-FR Cc: alexandre.belloni@bootlin.com In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Le 18/08/2026 à 14:41, Jiawen Liu a écrit : > From: jiawen <1298662399@qq.com> > > The probe function enables the peripheral clock (pclk) before the > reference clock (ref_clk), and its error path disables ref_clk before > pclk. However, the remove function disables pclk before ref_clk, which > is the reverse order. This asymmetric teardown can leave the clock > framework in an inconsistent state and violates the expected lifecycle > balance. Fix the remove function to disable ref_clk first, then pclk, > matching the probe enable order and the error path cleanup order. > > Signed-off-by: jiawen <1298662399@qq.com> > --- > diff --git a/drivers/rtc/rtc-cadence.c b/drivers/rtc/rtc-cadence.c > --- a/drivers/rtc/rtc-cadence.c > +++ b/drivers/rtc/rtc-cadence.c > @@ -361,8 +361,8 @@ > cdns_rtc_alarm_irq_enable(&pdev->dev, 0); > device_init_wakeup(&pdev->dev, false); > > + clk_disable_unprepare(crtc->ref_clk); > clk_disable_unprepare(crtc->pclk); > - clk_disable_unprepare(crtc->ref_clk); > } > > #ifdef CONFIG_PM_SLEEP > Hi, you should use ./scripts/get_maintainer.pl to identify to who the patch should be sent. A pmatch only sent to linux-kernel@... will be taken by no-one. Personally, I use "./scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats" to fileter even more the output. So adding Alexandre Belloni to my reply. Also, are you using "git format-patch" to prepare the patch to be sent? In my case, some more context is added after "@@ -361,8 +361,8 @@". This help when reviewing patches. Concerning your patch, I think that using devm_clk_get_enabled() instead of devm_clk_get() in the probe would be a better option. It changes the same order as you do and simplify the error handling path of the probe and the remove function. CJ