Re: [PATCH v3] coccinelle: api: add a checker for pm_runtime_use_autosuspend() usage
From: Joshua Crofts
Date: Sun Oct 11 2026 - 13:29:05 EST
On Wed, 16 Sep 2026 09:56:16 +0000
Joshua Crofts <joshua.crofts1@xxxxxxxxx> wrote:
> Add a checker for ensuring that pm_runtime_dont_use_autosuspend() is
> called in a file if pm_runtime_use_autosuspend() is called and its
> devm_* counterpart isn't present.
>
> Assisted-by: LLM
> Signed-off-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
> ---
> Running this in drivers/ yields 195 results, due to
> pm_runtime_dont_use_autosuspend() not being documented well enough.
>
> Changes in v3:
> - Remove note about resource leak from commit message
> - Link to v2: https://lore.kernel.org/lkml/20260915064327.1377-1-joshua.crofts1@xxxxxxxxx/
>
> Changes in v2:
> - Send correct version
> - Remove unnecessary position variable
> - Remove metavariable
> - Link to v1: https://lore.kernel.org/lkml/20260914151145.1328-1-joshua.crofts1@xxxxxxxxx/
Hi, you can drop this patch. I have a patch merged that removes the
need for calling dont_use_autosuspend() on unbind.
https://lore.kernel.org/all/20260919-move-dont-use-autosuspend-v1-1-f6e2d1315c23@xxxxxxxxx/
Thanks.
--
Kind regards,
Joshua Crofts