mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org, Andy Whitcroft <apw@canonical.com>,
	linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com,
	hans@jjverkuil.nl
Subject: Re: [PATCH 1/1] checkpatch: Deprecate V4L2 pipeline power management code
Date: Tue, 14 Jul 2026 15:31:59 +0300	[thread overview]
Message-ID: <alYsP882m2iB3UFk@kekkonen.localdomain> (raw)
In-Reply-To: <3e7b6acec459836275940908320db45a84f170b7.camel@perches.com>

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

      reply	other threads:[~2026-07-14 12:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13 16:13 Sakari Ailus
2026-07-14  8:15 ` Laurent Pinchart
2026-07-14 10:28 ` Joe Perches
2026-07-14 11:14   ` Sakari Ailus
2026-07-14 12:11     ` Joe Perches
2026-07-14 12:31       ` Sakari Ailus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alYsP882m2iB3UFk@kekkonen.localdomain \
    --to=sakari.ailus@linux.intel.com \
    --cc=apw@canonical.com \
    --cc=hans@jjverkuil.nl \
    --cc=joe@perches.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®