Re: [PATCH 1/1] checkpatch: Deprecate V4L2 pipeline power management code

From: Sakari Ailus

Date: Tue Jul 14 2026 - 08:37:12 EST


Hi Joe,

On Tue, Jul 14, 2026 at 05:11:17AM -0700, Joe Perches wrote:
> On Tue, 2026-07-14 at 14:14 +0300, Sakari Ailus wrote:
> > > Given this patch, checkpatch's message would be something like
> > >
> > "Deprecated use of 'v4l2_pipeline_pm_get', prefer '' instead"
> >
> > That's even technically correct: these functions serve no useful purpose
> > anymore, all new drivers effectively use Runtime PM anyway.
>
> OK, but given that there are only 32 uses in 16 files in all
> of -next, why not just fix the uses then delete the functions?
>
> $ git grep -P -w 'v4l2_pipeline_(?:link_notify|pm_get|pm_put)' | \
> grep -vP '^(?:include|drivers/media/v4l2-core)' | \
> wc -l
> 32
>
> $ git grep -P -w -l 'v4l2_pipeline_(?:link_notify|pm_get|pm_put)' | \
> grep -vP '^(?:include|drivers/media/v4l2-core)' | \
> wc -l
> 16

There are about 20 V4L2 sub-device drivers that implement the s_power()
sub-device video callback used by the v4l2_pipeline_*() functions. These
are generally old drivers and the conversion is typically not entirely
trivial.

The intent here is to avoid adding new users to these functions now -- some
have slipped through recently.

>
> > > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > > []
> > > > @@ -879,6 +879,9 @@ our %deprecated_apis = (
> > > > "DEFINE_IDR" => "DEFINE_XARRAY",
> > > > "idr_init" => "xa_init",
> > > > "idr_init_base" => "xa_init_flags",
> > > > + "v4l2_pipeline_link_notify" => "",
> > > > + "v4l2_pipeline_pm_get" => "",
> > > > + "v4l2_pipeline_pm_put" => "",
> > >
> > > Add something like "v4l2 runtime power management API" instead
> > > At least point out what that is.
> >
> > How about simply "Runtime PM"?
>
> Better than nothing IMO.

I'll send v2 with that.

--
Regards,

Sakari Ailus