mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] media: synopsys: csi2rx: various fixes
@ 2026-02-16 12:28 Michael Riesch via B4 Relay
  2026-02-16 12:28 ` [PATCH 1/2] media: synopsys: csi2rx: fix out-of-bounds check for formats array Michael Riesch via B4 Relay
  2026-02-16 12:28 ` [PATCH 2/2] media: synopsys: csi2rx: add missing kconfig dependency Michael Riesch via B4 Relay
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Riesch via B4 Relay @ 2026-02-16 12:28 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Hans Verkuil, Sakari Ailus, Mehdi Djait,
	Bryan O'Donoghue, Frank Li, Dan Carpenter
  Cc: Collabora Kernel Team, linux-media, linux-kernel, stable,
	Michael Riesch, kernel test robot

Habidere,

This series contains two fixes that address two issues raised by
CI bots.

1) A stupid off-by-one mistake in the check that protects the formats
   array. Thanks to Dan and his smatch bot.

2) A missing Kconfig dependency discovered by the lkp bot.

At this point, thanks to all the people that maintain those bots/the
CI infrastructure!

Best regards,
Michael

Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
---
Michael Riesch (2):
      media: synopsys: csi2rx: fix out-of-bounds check for formats array
      media: synopsys: csi2rx: add missing kconfig dependency

 drivers/media/platform/synopsys/Kconfig          | 1 +
 drivers/media/platform/synopsys/dw-mipi-csi2rx.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
---
base-commit: c824345288d11e269ce41b36c105715bc2286050
change-id: 20260216-snps-csi2rx-7b50a108ea3a

Best regards,
-- 
Michael Riesch <michael.riesch@collabora.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] media: synopsys: csi2rx: fix out-of-bounds check for formats array
  2026-02-16 12:28 [PATCH 0/2] media: synopsys: csi2rx: various fixes Michael Riesch via B4 Relay
@ 2026-02-16 12:28 ` Michael Riesch via B4 Relay
  2026-02-17 15:49   ` Frank Li
  2026-02-16 12:28 ` [PATCH 2/2] media: synopsys: csi2rx: add missing kconfig dependency Michael Riesch via B4 Relay
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Riesch via B4 Relay @ 2026-02-16 12:28 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Hans Verkuil, Sakari Ailus, Mehdi Djait,
	Bryan O'Donoghue, Frank Li, Dan Carpenter
  Cc: Collabora Kernel Team, linux-media, linux-kernel, stable, Michael Riesch

From: Michael Riesch <michael.riesch@collabora.com>

The out-of-bounds check for the format array is off by one. Fix the
check.

Fixes: 355a11004066 ("media: synopsys: add driver for the designware mipi csi-2 receiver")
Cc: stable@kernel.org
Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
---
 drivers/media/platform/synopsys/dw-mipi-csi2rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/synopsys/dw-mipi-csi2rx.c b/drivers/media/platform/synopsys/dw-mipi-csi2rx.c
index 170346ae1a59..4d96171a650b 100644
--- a/drivers/media/platform/synopsys/dw-mipi-csi2rx.c
+++ b/drivers/media/platform/synopsys/dw-mipi-csi2rx.c
@@ -301,7 +301,7 @@ dw_mipi_csi2rx_enum_mbus_code(struct v4l2_subdev *sd,
 
 		return 0;
 	case DW_MIPI_CSI2RX_PAD_SINK:
-		if (code->index > csi2->formats_num)
+		if (code->index >= csi2->formats_num)
 			return -EINVAL;
 
 		code->code = csi2->formats[code->index].code;

-- 
2.39.5



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] media: synopsys: csi2rx: add missing kconfig dependency
  2026-02-16 12:28 [PATCH 0/2] media: synopsys: csi2rx: various fixes Michael Riesch via B4 Relay
  2026-02-16 12:28 ` [PATCH 1/2] media: synopsys: csi2rx: fix out-of-bounds check for formats array Michael Riesch via B4 Relay
@ 2026-02-16 12:28 ` Michael Riesch via B4 Relay
  2026-02-17 15:49   ` [PATCH 2/2] media: synopsys: csi2rx: add missing kconfig dependencyy Frank Li
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Riesch via B4 Relay @ 2026-02-16 12:28 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Hans Verkuil, Sakari Ailus, Mehdi Djait,
	Bryan O'Donoghue, Frank Li, Dan Carpenter
  Cc: Collabora Kernel Team, linux-media, linux-kernel, stable,
	Michael Riesch, kernel test robot

From: Michael Riesch <michael.riesch@collabora.com>

Fix "ERROR: modpost: "phy_mipi_dphy_get_default_config_for_hsclk"
[drivers/media/platform/synopsys/dw-mipi-csi2rx.ko] undefined!" by
selecting GENERIC_PHY_MIPI_DPHY in the Kconfig entry.

Fixes: 355a11004066 ("media: synopsys: add driver for the designware mipi csi-2 receiver")
Cc: stable@kernel.org
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202602130253.BZnVd4jh-lkp@intel.com/
Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
---
 drivers/media/platform/synopsys/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/synopsys/Kconfig b/drivers/media/platform/synopsys/Kconfig
index e798ec00b189..bf2ac092fbb3 100644
--- a/drivers/media/platform/synopsys/Kconfig
+++ b/drivers/media/platform/synopsys/Kconfig
@@ -7,6 +7,7 @@ config VIDEO_DW_MIPI_CSI2RX
 	depends on VIDEO_DEV
 	depends on V4L_PLATFORM_DRIVERS
 	depends on PM && COMMON_CLK
+	select GENERIC_PHY_MIPI_DPHY
 	select MEDIA_CONTROLLER
 	select V4L2_FWNODE
 	select VIDEO_V4L2_SUBDEV_API

-- 
2.39.5



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] media: synopsys: csi2rx: fix out-of-bounds check for formats array
  2026-02-16 12:28 ` [PATCH 1/2] media: synopsys: csi2rx: fix out-of-bounds check for formats array Michael Riesch via B4 Relay
@ 2026-02-17 15:49   ` Frank Li
  0 siblings, 0 replies; 5+ messages in thread
From: Frank Li @ 2026-02-17 15:49 UTC (permalink / raw)
  To: michael.riesch
  Cc: Mauro Carvalho Chehab, Hans Verkuil, Sakari Ailus, Mehdi Djait,
	Bryan O'Donoghue, Dan Carpenter, Collabora Kernel Team,
	linux-media, linux-kernel, stable

On Mon, Feb 16, 2026 at 01:28:47PM +0100, Michael Riesch via B4 Relay wrote:
> From: Michael Riesch <michael.riesch@collabora.com>
>
> The out-of-bounds check for the format array is off by one. Fix the
> check.
>
> Fixes: 355a11004066 ("media: synopsys: add driver for the designware mipi csi-2 receiver")
> Cc: stable@kernel.org
> Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
> Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>  drivers/media/platform/synopsys/dw-mipi-csi2rx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/synopsys/dw-mipi-csi2rx.c b/drivers/media/platform/synopsys/dw-mipi-csi2rx.c
> index 170346ae1a59..4d96171a650b 100644
> --- a/drivers/media/platform/synopsys/dw-mipi-csi2rx.c
> +++ b/drivers/media/platform/synopsys/dw-mipi-csi2rx.c
> @@ -301,7 +301,7 @@ dw_mipi_csi2rx_enum_mbus_code(struct v4l2_subdev *sd,
>
>  		return 0;
>  	case DW_MIPI_CSI2RX_PAD_SINK:
> -		if (code->index > csi2->formats_num)
> +		if (code->index >= csi2->formats_num)
>  			return -EINVAL;
>
>  		code->code = csi2->formats[code->index].code;
>
> --
> 2.39.5
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] media: synopsys: csi2rx: add missing kconfig dependencyy
  2026-02-16 12:28 ` [PATCH 2/2] media: synopsys: csi2rx: add missing kconfig dependency Michael Riesch via B4 Relay
@ 2026-02-17 15:49   ` Frank Li
  0 siblings, 0 replies; 5+ messages in thread
From: Frank Li @ 2026-02-17 15:49 UTC (permalink / raw)
  To: michael.riesch
  Cc: Mauro Carvalho Chehab, Hans Verkuil, Sakari Ailus, Mehdi Djait,
	Bryan O'Donoghue, Dan Carpenter, Collabora Kernel Team,
	linux-media, linux-kernel, stable, kernel test robot

On Mon, Feb 16, 2026 at 01:28:48PM +0100, Michael Riesch via B4 Relay wrote:
> From: Michael Riesch <michael.riesch@collabora.com>
>
> Fix "ERROR: modpost: "phy_mipi_dphy_get_default_config_for_hsclk"
> [drivers/media/platform/synopsys/dw-mipi-csi2rx.ko] undefined!" by
> selecting GENERIC_PHY_MIPI_DPHY in the Kconfig entry.
>
> Fixes: 355a11004066 ("media: synopsys: add driver for the designware mipi csi-2 receiver")
> Cc: stable@kernel.org
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202602130253.BZnVd4jh-lkp@intel.com/
> Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>  drivers/media/platform/synopsys/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/media/platform/synopsys/Kconfig b/drivers/media/platform/synopsys/Kconfig
> index e798ec00b189..bf2ac092fbb3 100644
> --- a/drivers/media/platform/synopsys/Kconfig
> +++ b/drivers/media/platform/synopsys/Kconfig
> @@ -7,6 +7,7 @@ config VIDEO_DW_MIPI_CSI2RX
>  	depends on VIDEO_DEV
>  	depends on V4L_PLATFORM_DRIVERS
>  	depends on PM && COMMON_CLK
> +	select GENERIC_PHY_MIPI_DPHY
>  	select MEDIA_CONTROLLER
>  	select V4L2_FWNODE
>  	select VIDEO_V4L2_SUBDEV_API
>
> --
> 2.39.5
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-02-17 15:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-16 12:28 [PATCH 0/2] media: synopsys: csi2rx: various fixes Michael Riesch via B4 Relay
2026-02-16 12:28 ` [PATCH 1/2] media: synopsys: csi2rx: fix out-of-bounds check for formats array Michael Riesch via B4 Relay
2026-02-17 15:49   ` Frank Li
2026-02-16 12:28 ` [PATCH 2/2] media: synopsys: csi2rx: add missing kconfig dependency Michael Riesch via B4 Relay
2026-02-17 15:49   ` [PATCH 2/2] media: synopsys: csi2rx: add missing kconfig dependencyy Frank Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®