All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-media@vger.kernel.org, bingbu.cao@intel.com
Subject: Re: [PATCH 1/2] media: uapi: Make media_entity_get_fwnode_pad() fwnode argument const
Date: Fri, 2 Jun 2023 12:11:04 +0300	[thread overview]
Message-ID: <20230602091104.GA23701@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20230505205416.55002-2-sakari.ailus@linux.intel.com>

Hi Sakari,

Thank you for the patch.

On Fri, May 05, 2023 at 11:54:15PM +0300, Sakari Ailus wrote:
> fwnode_graph_parse_endpoint() fwnode argument is now const, therefore make
> media_entity_get_fwnode_pad() fwnode argument const as well.

"now", since 2017 :-) I'd phrase the commit message as

The media_entity_get_fwnode_pad() function never modifies its fwnode
argument. Make it const to allow usage of the function in contexts where
the fwnode pointer is const.

> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

> ---
>  drivers/media/mc/mc-entity.c | 2 +-
>  include/media/media-entity.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/mc/mc-entity.c b/drivers/media/mc/mc-entity.c
> index c1bc48c4d239..5ea9d3e5d59b 100644
> --- a/drivers/media/mc/mc-entity.c
> +++ b/drivers/media/mc/mc-entity.c
> @@ -1426,7 +1426,7 @@ struct media_pad *media_pad_remote_pad_unique(const struct media_pad *pad)
>  EXPORT_SYMBOL_GPL(media_pad_remote_pad_unique);
>  
>  int media_entity_get_fwnode_pad(struct media_entity *entity,
> -				struct fwnode_handle *fwnode,
> +				const struct fwnode_handle *fwnode,
>  				unsigned long direction_flags)
>  {
>  	struct fwnode_endpoint endpoint;
> diff --git a/include/media/media-entity.h b/include/media/media-entity.h
> index e4f556911c3f..2b6cd343ee9e 100644
> --- a/include/media/media-entity.h
> +++ b/include/media/media-entity.h
> @@ -1079,7 +1079,7 @@ struct media_pipeline *media_pad_pipeline(struct media_pad *pad);
>   * Return: returns the pad number on success or a negative error code.
>   */
>  int media_entity_get_fwnode_pad(struct media_entity *entity,
> -				struct fwnode_handle *fwnode,
> +				const struct fwnode_handle *fwnode,
>  				unsigned long direction_flags);
>  
>  /**

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2023-06-02  9:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 20:54 [PATCH 0/2] Small MC + CIO2 cleanups Sakari Ailus
2023-05-05 20:54 ` [PATCH 1/2] media: uapi: Make media_entity_get_fwnode_pad() fwnode argument const Sakari Ailus
2023-06-02  9:11   ` Laurent Pinchart [this message]
2023-05-05 20:54 ` [PATCH 2/2] media: pci: ipu3-cio2: Obtain remote pad from endpoint Sakari Ailus

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=20230602091104.GA23701@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=bingbu.cao@intel.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.