2023-04-21 10:06:41

by Vaishnav Achath

[permalink] [raw]
Subject: [PATCH] media: v4l2-mc: Drop subdev check in v4l2_create_fwnode_links_to_pad()

While updating v4l2_create_fwnode_links_to_pad() to accept non-subdev
sinks, the check is_media_entity_v4l2_subdev() was not removed which
prevented the function from being used with non-subdev sinks, Drop the
unnecessary check.

Fixes: bd5a03bc5be8 ("media: Accept non-subdev sinks in v4l2_create_fwnode_links_to_pad()")

Signed-off-by: Vaishnav Achath <[email protected]>
---
drivers/media/v4l2-core/v4l2-mc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/v4l2-core/v4l2-mc.c b/drivers/media/v4l2-core/v4l2-mc.c
index bf0c18100664..22fe08fce0a9 100644
--- a/drivers/media/v4l2-core/v4l2-mc.c
+++ b/drivers/media/v4l2-core/v4l2-mc.c
@@ -314,8 +314,7 @@ int v4l2_create_fwnode_links_to_pad(struct v4l2_subdev *src_sd,
{
struct fwnode_handle *endpoint;

- if (!(sink->flags & MEDIA_PAD_FL_SINK) ||
- !is_media_entity_v4l2_subdev(sink->entity))
+ if (!(sink->flags & MEDIA_PAD_FL_SINK))
return -EINVAL;

fwnode_graph_for_each_endpoint(dev_fwnode(src_sd->dev), endpoint) {
--
2.17.1


2023-04-21 12:14:55

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH] media: v4l2-mc: Drop subdev check in v4l2_create_fwnode_links_to_pad()

Hi Vaishnav,

Thank you for the patch.

On Fri, Apr 21, 2023 at 03:34:30PM +0530, Vaishnav Achath wrote:
> While updating v4l2_create_fwnode_links_to_pad() to accept non-subdev
> sinks, the check is_media_entity_v4l2_subdev() was not removed which
> prevented the function from being used with non-subdev sinks, Drop the
> unnecessary check.
>
> Fixes: bd5a03bc5be8 ("media: Accept non-subdev sinks in v4l2_create_fwnode_links_to_pad()")
>
> Signed-off-by: Vaishnav Achath <[email protected]>

Reviewed-by: Laurent Pinchart <[email protected]>

Sakari, the commit this patch fixes will land in v6.4, should this be
merged as a v6.4 fix ?

> ---
> drivers/media/v4l2-core/v4l2-mc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/media/v4l2-core/v4l2-mc.c b/drivers/media/v4l2-core/v4l2-mc.c
> index bf0c18100664..22fe08fce0a9 100644
> --- a/drivers/media/v4l2-core/v4l2-mc.c
> +++ b/drivers/media/v4l2-core/v4l2-mc.c
> @@ -314,8 +314,7 @@ int v4l2_create_fwnode_links_to_pad(struct v4l2_subdev *src_sd,
> {
> struct fwnode_handle *endpoint;
>
> - if (!(sink->flags & MEDIA_PAD_FL_SINK) ||
> - !is_media_entity_v4l2_subdev(sink->entity))
> + if (!(sink->flags & MEDIA_PAD_FL_SINK))
> return -EINVAL;
>
> fwnode_graph_for_each_endpoint(dev_fwnode(src_sd->dev), endpoint) {

--
Regards,

Laurent Pinchart

2023-04-21 12:18:47

by Sakari Ailus

[permalink] [raw]
Subject: Re: [PATCH] media: v4l2-mc: Drop subdev check in v4l2_create_fwnode_links_to_pad()

On Fri, Apr 21, 2023 at 03:10:48PM +0300, Laurent Pinchart wrote:
> Hi Vaishnav,
>
> Thank you for the patch.
>
> On Fri, Apr 21, 2023 at 03:34:30PM +0530, Vaishnav Achath wrote:
> > While updating v4l2_create_fwnode_links_to_pad() to accept non-subdev
> > sinks, the check is_media_entity_v4l2_subdev() was not removed which
> > prevented the function from being used with non-subdev sinks, Drop the
> > unnecessary check.
> >
> > Fixes: bd5a03bc5be8 ("media: Accept non-subdev sinks in v4l2_create_fwnode_links_to_pad()")
> >
> > Signed-off-by: Vaishnav Achath <[email protected]>
>
> Reviewed-by: Laurent Pinchart <[email protected]>
>
> Sakari, the commit this patch fixes will land in v6.4, should this be
> merged as a v6.4 fix ?

I'd think so. I'll take this soonish.

--
Sakari Ailus