[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aW3_xSm2N42XTtzu@kekkonen.localdomain>
Date: Mon, 19 Jan 2026 11:56:21 +0200
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Michael Riesch <michael.riesch@...labora.com>
Cc: Frank Li <Frank.li@....com>, Chaoyi Chen <chaoyi.chen@...k-chips.com>,
Kever Yang <kever.yang@...k-chips.com>,
Mehdi Djait <mehdi.djait@...ux.intel.com>,
Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Hans Verkuil <hverkuil@...nel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Heiko Stuebner <heiko@...ech.de>,
Philipp Zabel <p.zabel@...gutronix.de>,
Sebastian Reichel <sebastian.reichel@...labora.com>,
Nicolas Dufresne <nicolas.dufresne@...labora.com>,
Collabora Kernel Team <kernel@...labora.com>,
linux-media@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 2/3] media: synopsys: add driver for the designware
mipi csi-2 receiver
Hi Michael,
On Mon, Jan 19, 2026 at 10:49:20AM +0100, Michael Riesch wrote:
> Hi Frank,
>
> Thanks for your review.
>
> On 1/16/26 17:08, Frank Li wrote:
> > On Fri, Jan 16, 2026 at 02:02:47PM +0100, Michael Riesch wrote:
> >> The Synopsys DesignWare MIPI CSI-2 Receiver is a CSI-2 bridge with
> >> one input port and one output port. It receives the data with the
> >> help of an external MIPI PHY (C-PHY or D-PHY) and passes it to e.g.,
> >> the Rockchip Video Capture (VICAP) block on recent Rockchip SoCs.
> >>
> >> Add a V4L2 subdevice driver for this unit.
> >>
> >> Signed-off-by: Michael Riesch <michael.riesch@...fvision.net>
> >> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
> >> Reviewed-by: Mehdi Djait <mehdi.djait@...ux.intel.com>
> >> Signed-off-by: Michael Riesch <michael.riesch@...labora.com>
> >> ---
> > ...
> >> +
> >> +static inline struct dw_mipi_csi2_device *to_csi2(struct v4l2_subdev *sd)
> >> +{
> >> + return container_of(sd, struct dw_mipi_csi2_device, sd);
> >> +}
> >> +
> >> +static inline __maybe_unused void
> >
> > why need '__maybe_unused', needn't inline. compiler can auto decide and
> > report unused function if no 'inline'.
>
> The __maybe_unused was helpful during development and is not really
> required now. It doesn't hurt either, so I left it in. I can remove it
> if you wish.
Please. :-)
> >> +static int dw_mipi_csi2_register_notifier(struct dw_mipi_csi2_device *csi2)
> >> +{
> >> + struct v4l2_async_connection *asd;
> >> + struct v4l2_async_notifier *ntf = &csi2->notifier;
> >> + struct v4l2_fwnode_endpoint vep;
> >> + struct v4l2_subdev *sd = &csi2->sd;
> >> + struct device *dev = csi2->dev;
> >> + struct fwnode_handle *ep;
> >> + int ret;
> >> +
> >> + ep = fwnode_graph_get_endpoint_by_id(dev_fwnode(dev), 0, 0, 0);
> >
> > use struct fwnode_handle *ep __free(fwnode_handle) can simplify err
> > handler.
>
> Sorry, I don't see the benefit of that.
I'd prefer this, too, when you unconditionally need to release or put
something. It'll make error handling simpler, too.
--
Kind regards,
Sakari Ailus
Powered by blists - more mailing lists