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

Michael Riesch michael.riesch at collabora.com
Tue Jan 20 23:29:25 PST 2026


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 at 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

> 
> 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:
> 




More information about the linux-arm-kernel mailing list