Hi, On Mon, Mar 25, 2024 at 10:06 AM Stephen Boyd <sboyd@xxxxxxxxxx> wrote: > > > > +/* > > > + * Call clk_pm_runtime_get() on all runtime PM enabled clks in the clk tree so > > > + * that disabling unused clks avoids a deadlock where a device is runtime PM > > > + * resuming/suspending and the runtime PM callback is trying to grab the > > > + * prepare_lock for something like clk_prepare_enable() while > > > + * clk_disable_unused_subtree() holds the prepare_lock and is trying to runtime > > > + * PM resume/suspend the device as well. > > > + */ > > > +static int clk_pm_runtime_get_all(void) > > > > nit: It'd be nice if this documented that it acquired / held the lock. > > Could be in comments, or, might as well use the syntax like this (I > > think): > > > > __acquires(&clk_rpm_list_lock); > > > > ...similar with the put function. > > I had that but removed it because on the error path we drop the lock and > sparse complains. I don't know how to signal that the lock is held > unless an error happens, but I'm a little out of date on sparse now. I'd settle for something in the comments then? Maybe tagged with "Context:" ? Thanks! -Doug