Thread (8 messages) 8 messages, 4 authors, 2026-01-21

Re: fixup! media: synopsys: add driver for the designware mipi csi-2 receiver

From: Michael Riesch <michael.riesch@collabora.com>
Date: 2026-01-21 07:29:34
Also in: linux-arm-kernel, linux-media, linux-rockchip, lkml

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:
quoted
Make smatch happy by adding braces around the initialization in switch
cases.

Signed-off-by: Michael Riesch <michael.riesch@collabora.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
quoted hunk ↗ jump to hunk
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:
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help