lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7722373a-b491-4aaa-9527-a8f091cf22fe@collabora.com>
Date: Tue, 20 Jan 2026 20:35:17 +0100
From: Michael Riesch <michael.riesch@...labora.com>
To: 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>,
 Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: 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: fixup! media: synopsys: add driver for the designware mipi csi-2
 receiver

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.

 drivers/media/platform/synopsys/dw-mipi-csi2rx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/synopsys/dw-mipi-csi2rx.c
b/drivers/media/platform/synopsys/dw-mipi-csi2rx.c
index 29119a1a8d38..dc82223e312a 100644
--- a/drivers/media/platform/synopsys/dw-mipi-csi2rx.c
+++ b/drivers/media/platform/synopsys/dw-mipi-csi2rx.c
@@ -236,7 +236,7 @@ static int dw_mipi_csi2rx_start(struct
dw_mipi_csi2rx_device *csi2)
                return link_freq;

        switch (csi2->bus_type) {
-       case V4L2_MBUS_CSI2_DPHY:
+       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,
@@ -254,7 +254,7 @@ static int dw_mipi_csi2rx_start(struct
dw_mipi_csi2rx_device *csi2)

                control |= SW_CPHY_EN(0);
                break;
-
+       }
        case V4L2_MBUS_CSI2_CPHY:
                /* TODO: implement CPHY configuration */
                return -EOPNOTSUPP;
@@ -293,7 +293,7 @@ dw_mipi_csi2rx_enum_mbus_code(struct v4l2_subdev *sd,
        struct dw_mipi_csi2rx_device *csi2 = to_csi2(sd);

        switch (code->pad) {
-       case DW_MIPI_CSI2RX_PAD_SRC:
+       case DW_MIPI_CSI2RX_PAD_SRC: {
                const struct v4l2_mbus_framefmt *sink_fmt;

                if (code->index)
@@ -304,6 +304,7 @@ dw_mipi_csi2rx_enum_mbus_code(struct v4l2_subdev *sd,
                code->code = sink_fmt->code;

                return 0;
+       }
        case DW_MIPI_CSI2RX_PAD_SINK:
                if (code->index > csi2->formats_num)
                        return -EINVAL;

-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ