linux-stable/drivers/media/platform/mediatek
Arnd Bergmann 7334b815d2 media: mediatek: vcodec: avoid -Wcast-function-type-strict warning
[ Upstream commit bfb1b99802 ]

The ipi handler here tries hard to maintain const-ness of its argument,
but by doing that causes a warning about function type casts:

drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c:38:32: error: cast from 'mtk_vcodec_ipi_handler' (aka 'void (*)(void *, unsigned int, void *)') to 'ipi_handler_t' (aka 'void (*)(const void *, unsigned int, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
   38 |         ipi_handler_t handler_const = (ipi_handler_t)handler;
      |                                       ^~~~~~~~~~~~~~~~~~~~~~

Remove the hack and just use a non-const argument.

Fixes: bf1d556ad4 ("media: mtk-vcodec: abstract firmware interface")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:19:53 -04:00
..
jpeg media: mtk-jpeg: Fix use after free bug due to error path handling in mtk_jpeg_dec_device_run 2024-01-31 16:18:55 -08:00
mdp media: mediatek: vcodec: avoid -Wcast-function-type-strict warning 2024-03-26 18:19:53 -04:00
mdp3 media: platform: mtk-mdp3: fix uninitialized variable in mdp_path_config() 2023-11-20 11:59:33 +01:00
vcodec media: mediatek: vcodec: avoid -Wcast-function-type-strict warning 2024-03-26 18:19:53 -04:00
vpu media: mediatek: vcodec: avoid -Wcast-function-type-strict warning 2024-03-26 18:19:53 -04:00
Kconfig media: platform: mtk-mdp3: add MediaTek MDP3 driver 2022-08-30 16:25:51 +02:00
Makefile media: platform: mtk-mdp3: add MediaTek MDP3 driver 2022-08-30 16:25:51 +02:00