public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] media: Zero-initialize structures passed to subdev pad ops
@ 2023-02-15 16:50 Laurent Pinchart
  2023-02-15 16:50 ` [PATCH 1/3] media: Zero-initialize all structures passed to subdev pad operations Laurent Pinchart
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Laurent Pinchart @ 2023-02-15 16:50 UTC (permalink / raw)
  To: linux-media
  Cc: Hans Verkuil, Sakari Ailus, Tomi Valkeinen, Yong Zhi, Bingbu Cao,
	Dan Scally, Tianshu Qiu, Eugen Hristev, Robert Foss, Todor Tomov,
	Kieran Bingham, Sylwester Nawrocki, Prabhakar Lad, Benoit Parrot,
	Shuah Khan, Michael Krufky, Steve Longerbeam, Philipp Zabel,
	Thierry Reding, Jonathan Hunter, Sowjanya Komatineni, kernel,
	linux-imx

Hello,

This patch series fixes a (surprisingly large) number of drivers that
don't zero-initialize structures passed to subdev pad operations.

The rationale is explained in patch 1/3, which fixes the issue: while
this doesn't cause any immediate problem, it leaves reserved fields
uninitialized, and any future change of in-kernel APIs that make use of
some of the reserved fields may introduce hard to catch breakages.

Patches 2/3 and 3/3 are not strictly required to fix the problem, but
they address coding style consistency issues that bothered me when
developing 1/3.

Laurent Pinchart (3):
  media: Zero-initialize all structures passed to subdev pad operations
  media: Prefer designated initializers over memset for subdev pad ops
  media: USe designated initializers for all subdev pad ops

 drivers/media/pci/cobalt/cobalt-v4l2.c        | 21 ++++++----
 drivers/media/pci/intel/ipu3/ipu3-cio2-main.c |  1 +
 .../platform/microchip/microchip-isc-base.c   |  5 ++-
 .../media/platform/qcom/camss/camss-video.c   |  5 ++-
 .../media/platform/renesas/vsp1/vsp1_drm.c    | 23 ++++++-----
 .../media/platform/renesas/vsp1/vsp1_entity.c | 11 +++--
 .../media/platform/renesas/vsp1/vsp1_video.c  |  5 ++-
 .../samsung/exynos4-is/fimc-capture.c         | 18 +++++----
 .../samsung/exynos4-is/fimc-isp-video.c       | 10 +++--
 .../platform/samsung/exynos4-is/fimc-lite.c   |  9 +++--
 .../samsung/s3c-camif/camif-capture.c         |  5 ++-
 .../platform/samsung/s3c-camif/camif-core.c   |  5 ++-
 .../media/platform/ti/am437x/am437x-vpfe.c    | 35 ++++++++--------
 drivers/media/platform/ti/cal/cal-video.c     | 37 +++++++++--------
 drivers/media/platform/ti/omap3isp/ispccdc.c  |  5 ++-
 drivers/media/platform/ti/omap3isp/ispvideo.c | 20 ++++++----
 drivers/media/platform/xilinx/xilinx-dma.c    |  5 ++-
 drivers/media/test-drivers/vimc/vimc-common.c |  8 ++--
 drivers/media/usb/dvb-usb/cxusb-analog.c      | 14 +++----
 .../media/deprecated/atmel/atmel-isc-base.c   |  5 ++-
 drivers/staging/media/imx/imx-media-capture.c | 40 ++++++++++---------
 drivers/staging/media/imx/imx-media-utils.c   |  8 ++--
 drivers/staging/media/omap4iss/iss_video.c    | 16 ++++----
 drivers/staging/media/tegra-video/vi.c        | 10 +++--
 24 files changed, 182 insertions(+), 139 deletions(-)


base-commit: 83e0f265aa8d0e37cc8e15d318b64da0ec03ff41
-- 
Regards,

Laurent Pinchart


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

end of thread, other threads:[~2023-03-06 13:02 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-15 16:50 [PATCH 0/3] media: Zero-initialize structures passed to subdev pad ops Laurent Pinchart
2023-02-15 16:50 ` [PATCH 1/3] media: Zero-initialize all structures passed to subdev pad operations Laurent Pinchart
2023-02-27 22:30   ` Shuah Khan
2023-02-28  9:05   ` Lad, Prabhakar
2023-02-28 10:05   ` Sakari Ailus
2023-02-28 23:55     ` Laurent Pinchart
2023-02-28 23:58       ` Laurent Pinchart
2023-03-01  7:55         ` Sakari Ailus
2023-03-01  8:43           ` Bingbu Cao
2023-03-06 13:00   ` Philipp Zabel
2023-02-15 16:50 ` [PATCH 2/3] media: Prefer designated initializers over memset for subdev pad ops Laurent Pinchart
2023-02-28  9:09   ` Lad, Prabhakar
2023-03-06 13:01   ` Philipp Zabel
2023-02-15 16:50 ` [PATCH 3/3] media: USe designated initializers for all " Laurent Pinchart
2023-02-28 15:52 ` [PATCH 0/3] media: Zero-initialize structures passed to " Tomi Valkeinen
2023-02-28 16:41 ` Kieran Bingham

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