Thread (36 messages) 36 messages, 3 authors, 2023-06-19

Re: [PATCH v14 13/18] media: i2c: ds90ub953: Use v4l2_fwnode_endpoint_parse()

From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Date: 2023-06-19 08:53:52
Also in: linux-i2c, linux-media, lkml

On 16/06/2023 17:24, Andy Shevchenko wrote:
On Fri, Jun 16, 2023 at 04:59:17PM +0300, Tomi Valkeinen wrote:
quoted
Use v4l2_fwnode_endpoint_parse() to parse the sink endpoint parameters.
quoted
+	nlanes = vep.bus.mipi_csi2.num_data_lanes;
  
I would also drop this blank line now.
Ok.
quoted
-	if (ret != 1 && ret != 2 && ret != 4)
+	if (nlanes != 1 && nlanes != 2 && nlanes != 4)
Isn't the following cleaner?

	if (!is_power_of_2(nlanes) || nlanes > 4)
No, I don't think so... The current one is more human-readable.
quoted
  		return dev_err_probe(dev, -EINVAL,
-				     "bad number of data-lanes: %d\n", ret);
+				     "bad number of data-lanes: %d\n", nlanes);
  Tomi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help