WSL2-Linux-Kernel/drivers/media/platform/am437x
Laurent Pinchart 9f87ee85ce media: Prefer designated initializers over memset for subdev pad ops
[ Upstream commit e3a69496a1 ]

Structures passed to subdev pad operations are all zero-initialized, but
not always with the same kind of code constructs. While most drivers
used designated initializers, which zero all the fields that are not
specified, when declaring variables, some use memset(). Those two
methods lead to the same end result, and, depending on compiler
optimizations, may even be completely equivalent, but they're not
consistent.

Improve coding style consistency by using designated initializers
instead of calling memset(). Where applicable, also move the variables
to inner scopes of for loops to ensure correct initialization in all
iterations.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Lad Prabhakar <prabhakar.csengg@gmail.com> # For am437x
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-24 17:36:44 +01:00
..
Kconfig media: Kconfig files: use select for V4L2 subdevs and MC 2020-04-14 10:29:05 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
am437x-vpfe.c media: Prefer designated initializers over memset for subdev pad ops 2023-05-24 17:36:44 +01:00
am437x-vpfe.h media: am437x-vpfe: Switch to SPDX Licensing 2019-10-01 16:15:38 -03:00
am437x-vpfe_regs.h media: am437x-vpfe: Switch to SPDX Licensing 2019-10-01 16:15:38 -03:00