[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <78fdbb28-4133-0165-69ff-a0e568cd84fe@ideasonboard.com>
Date: Mon, 19 Jun 2023 11:52:19 +0300
From: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: linux-media@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
Luca Ceresoli <luca.ceresoli@...tlin.com>,
Matti Vaittinen <Matti.Vaittinen@...rohmeurope.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Wolfram Sang <wsa@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Peter Rosin <peda@...ntia.se>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Michael Tretter <m.tretter@...gutronix.de>,
Hans Verkuil <hverkuil@...all.nl>,
Mike Pagano <mpagano@...too.org>,
Krzysztof HaĆasa <khalasa@...p.pl>,
Marek Vasut <marex@...x.de>,
Satish Nagireddy <satish.nagireddy@...cruise.com>
Subject: Re: [PATCH v14 13/18] media: i2c: ds90ub953: Use
v4l2_fwnode_endpoint_parse()
On 16/06/2023 17:24, Andy Shevchenko wrote:
> On Fri, Jun 16, 2023 at 04:59:17PM +0300, Tomi Valkeinen wrote:
>> Use v4l2_fwnode_endpoint_parse() to parse the sink endpoint parameters.
>
>> + nlanes = vep.bus.mipi_csi2.num_data_lanes;
>>
>
> I would also drop this blank line now.
Ok.
>> - 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.
>> return dev_err_probe(dev, -EINVAL,
>> - "bad number of data-lanes: %d\n", ret);
>> + "bad number of data-lanes: %d\n", nlanes);
>
Tomi
Powered by blists - more mailing lists