All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: v4l2-fwnode: Simplify v4l2_async_notifier_parse_fwnode_endpoints()
@ 2021-03-10 15:37 Niklas Söderlund
  2021-03-11 11:51 ` Sakari Ailus
  0 siblings, 1 reply; 3+ messages in thread
From: Niklas Söderlund @ 2021-03-10 15:37 UTC (permalink / raw)
  To: Sakari Ailus, Hans Verkuil, linux-media
  Cc: linux-renesas-soc, Niklas Söderlund

There are only one user left of __v4l2_async_notifier_parse_fwnode_ep()
since [1], v4l2_async_notifier_parse_fwnode_endpoints(). Merge the two
and remove some dead code.

1. commit 0ae426ebd0dcef81 ("media: v4l2-fwnode: Remove v4l2_async_notifier_parse_fwnode_endpoints_by_port()")

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 drivers/media/v4l2-core/v4l2-fwnode.c | 34 ++++-----------------------
 1 file changed, 5 insertions(+), 29 deletions(-)

diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c
index 2283ff3b8e1d8662..2abb1430da1e1cf5 100644
--- a/drivers/media/v4l2-core/v4l2-fwnode.c
+++ b/drivers/media/v4l2-core/v4l2-fwnode.c
@@ -839,13 +839,11 @@ v4l2_async_notifier_fwnode_parse_endpoint(struct device *dev,
 	return ret == -ENOTCONN ? 0 : ret;
 }
 
-static int
-__v4l2_async_notifier_parse_fwnode_ep(struct device *dev,
-				      struct v4l2_async_notifier *notifier,
-				      size_t asd_struct_size,
-				      unsigned int port,
-				      bool has_port,
-				      parse_endpoint_func parse_endpoint)
+int
+v4l2_async_notifier_parse_fwnode_endpoints(struct device *dev,
+					   struct v4l2_async_notifier *notifier,
+					   size_t asd_struct_size,
+					   parse_endpoint_func parse_endpoint)
 {
 	struct fwnode_handle *fwnode;
 	int ret = 0;
@@ -863,17 +861,6 @@ __v4l2_async_notifier_parse_fwnode_ep(struct device *dev,
 		if (!is_available)
 			continue;
 
-		if (has_port) {
-			struct fwnode_endpoint ep;
-
-			ret = fwnode_graph_parse_endpoint(fwnode, &ep);
-			if (ret)
-				break;
-
-			if (ep.port != port)
-				continue;
-		}
-
 		ret = v4l2_async_notifier_fwnode_parse_endpoint(dev,
 								notifier,
 								fwnode,
@@ -887,17 +874,6 @@ __v4l2_async_notifier_parse_fwnode_ep(struct device *dev,
 
 	return ret;
 }
-
-int
-v4l2_async_notifier_parse_fwnode_endpoints(struct device *dev,
-					   struct v4l2_async_notifier *notifier,
-					   size_t asd_struct_size,
-					   parse_endpoint_func parse_endpoint)
-{
-	return __v4l2_async_notifier_parse_fwnode_ep(dev, notifier,
-						     asd_struct_size, 0,
-						     false, parse_endpoint);
-}
 EXPORT_SYMBOL_GPL(v4l2_async_notifier_parse_fwnode_endpoints);
 
 /*
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: v4l2-fwnode: Simplify v4l2_async_notifier_parse_fwnode_endpoints()
  2021-03-10 15:37 [PATCH] media: v4l2-fwnode: Simplify v4l2_async_notifier_parse_fwnode_endpoints() Niklas Söderlund
@ 2021-03-11 11:51 ` Sakari Ailus
  2021-03-12 14:32   ` Niklas Söderlund
  0 siblings, 1 reply; 3+ messages in thread
From: Sakari Ailus @ 2021-03-11 11:51 UTC (permalink / raw)
  To: Niklas Söderlund; +Cc: Hans Verkuil, linux-media, linux-renesas-soc

Hi Niklas,

On Wed, Mar 10, 2021 at 04:37:43PM +0100, Niklas Söderlund wrote:
> There are only one user left of __v4l2_async_notifier_parse_fwnode_ep()
> since [1], v4l2_async_notifier_parse_fwnode_endpoints(). Merge the two
> and remove some dead code.
> 
> 1. commit 0ae426ebd0dcef81 ("media: v4l2-fwnode: Remove v4l2_async_notifier_parse_fwnode_endpoints_by_port()")
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

This and the rcar-vin patch no longer apply after my patches related to
V4L2 async. Could you rebase these on them? I've pushed them to the master
branch in my V4L2 git tree.

Thanks.

-- 
Kind regards,

Sakari Ailus

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: v4l2-fwnode: Simplify v4l2_async_notifier_parse_fwnode_endpoints()
  2021-03-11 11:51 ` Sakari Ailus
@ 2021-03-12 14:32   ` Niklas Söderlund
  0 siblings, 0 replies; 3+ messages in thread
From: Niklas Söderlund @ 2021-03-12 14:32 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: Hans Verkuil, linux-media, linux-renesas-soc

Hi Sakari,

Thanks for your feedback.

On 2021-03-11 13:51:27 +0200, Sakari Ailus wrote:
> Hi Niklas,
> 
> On Wed, Mar 10, 2021 at 04:37:43PM +0100, Niklas Söderlund wrote:
> > There are only one user left of __v4l2_async_notifier_parse_fwnode_ep()
> > since [1], v4l2_async_notifier_parse_fwnode_endpoints(). Merge the two
> > and remove some dead code.
> > 
> > 1. commit 0ae426ebd0dcef81 ("media: v4l2-fwnode: Remove v4l2_async_notifier_parse_fwnode_endpoints_by_port()")
> > 
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> 
> This and the rcar-vin patch no longer apply after my patches related to
> V4L2 async. Could you rebase these on them? I've pushed them to the master
> branch in my V4L2 git tree.

I will rebase and resend those two.

A heads up, your branch fails to compile for me so I had to locally drop 
'v4l: async, fwnode: Improve module organisation' while testing. I will 
reply to your series with more detailed feedback.

> 
> Thanks.
> 
> -- 
> Kind regards,
> 
> Sakari Ailus

-- 
Regards,
Niklas Söderlund

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-12 14:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 15:37 [PATCH] media: v4l2-fwnode: Simplify v4l2_async_notifier_parse_fwnode_endpoints() Niklas Söderlund
2021-03-11 11:51 ` Sakari Ailus
2021-03-12 14:32   ` Niklas Söderlund

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.