[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250506101604.GD177796@e132581.arm.com>
Date: Tue, 6 May 2025 11:16:04 +0100
From: Leo Yan <leo.yan@....com>
To: Anshuman Khandual <anshuman.khandual@....com>
Cc: Suzuki K Poulose <suzuki.poulose@....com>,
Mike Leach <mike.leach@...aro.org>,
James Clark <james.clark@...aro.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com
Subject: Re: [PATCH v2 9/9] coresight: Refactor runtime PM
On Fri, May 02, 2025 at 02:15:49PM +0530, Anshuman Khandual wrote:
>
> On 4/23/25 20:47, Leo Yan wrote:
> > The validation for driver data pointers and clock pointers are redundant
> > in the runtime PM callbacks. After a driver's probing, its driver data
> > and clocks have been initialized successfully, this ensures it is safe
> > to access driver data and clocks in the runtime PM callbacks. A corner
> > case is a clock pointer is NULL, in this case, the clock core layer can
> > handle it properly. So remove these redundant checking.
> >
> > In runtime resume, respect values returned from clock function and add
> > error handling.
>
> Although not checking drvdata and drvdata->apb_clk does make sense, but
> why change the semantics on the resume paths as well, which now returns
> stored error value from clk_prepare_enable().
Let us assume if a clock fails to enable during the resume flow, with
current code, we miss a chance to detect issues in the first place.
I understand the clock enabling failures are rare, but propagating an
error in the resume callbacks would help identify potential issues.
It seems to me that this patch does not change the semantics of the
resume paths. It enhances the resume flow for early error reporting.
Thanks,
Leo
Powered by blists - more mailing lists