[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2c0bbe6e-3328-438f-b9ab-8fe84fa87912@collabora.com>
Date: Wed, 21 Jan 2026 08:29:25 +0100
From: Michael Riesch <michael.riesch@...labora.com>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: Chaoyi Chen <chaoyi.chen@...k-chips.com>,
Kever Yang <kever.yang@...k-chips.com>, Frank Li <Frank.li@....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: fixup! media: synopsys: add driver for the designware mipi csi-2
receiver
Hi Sakari,
On 1/21/26 00:05, Sakari Ailus wrote:
> Hi Michael,
>
> On Tue, Jan 20, 2026 at 08:35:17PM +0100, Michael Riesch wrote:
>> Make smatch happy by adding braces around the initialization in switch
>> cases.
>>
>> Signed-off-by: Michael Riesch <michael.riesch@...labora.com>
>> ---
>> @Sakari could you try the following patch? I think this should solve the
>> issues with smatch/sparse you mentioned off-list.
>
> I don't know what went wrong but this won't apply.
>
> Instead I made the following changes:
Yep, these are fine. Thank you very much for doing the fixup!
Best regards,
Michael
>
> diff --git a/drivers/media/platform/synopsys/dw-mipi-csi2rx.c b/drivers/media/platform/synopsys/dw-mipi-csi2rx.c
> index 29119a1a8d38..170346ae1a59 100644
> --- a/drivers/media/platform/synopsys/dw-mipi-csi2rx.c
> +++ b/drivers/media/platform/synopsys/dw-mipi-csi2rx.c
> @@ -237,10 +237,8 @@ static int dw_mipi_csi2rx_start(struct dw_mipi_csi2rx_device *csi2)
>
> switch (csi2->bus_type) {
> case V4L2_MBUS_CSI2_DPHY:
> - struct phy_configure_opts_mipi_dphy *cfg = &opts.mipi_dphy;
> -
> ret = phy_mipi_dphy_get_default_config_for_hsclk(link_freq * 2,
> - lanes, cfg);
> + lanes, &opts.mipi_dphy);
> if (ret)
> return ret;
>
> @@ -294,14 +292,12 @@ dw_mipi_csi2rx_enum_mbus_code(struct v4l2_subdev *sd,
>
> switch (code->pad) {
> case DW_MIPI_CSI2RX_PAD_SRC:
> - const struct v4l2_mbus_framefmt *sink_fmt;
> -
> if (code->index)
> return -EINVAL;
>
> - sink_fmt = v4l2_subdev_state_get_format(
> - sd_state, DW_MIPI_CSI2RX_PAD_SINK);
> - code->code = sink_fmt->code;
> + code->code =
> + v4l2_subdev_state_get_format(sd_state,
> + DW_MIPI_CSI2RX_PAD_SINK)->code;
>
> return 0;
> case DW_MIPI_CSI2RX_PAD_SINK:
>
Powered by blists - more mailing lists