media: mtk_jpeg_core: avoid unused-variable warning
Subsystems (3)
PATCH 1/1 media: mtk_jpeg_core: avoid unused-variable warning
From: Arnd Bergmann <[email protected]>
The only reference to mtk8195_jpegenc_drvdata is inside of an #ifdef:
drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c:1879:32: error: 'mtk8195_jpegenc_drvdata' defined but not used [-Werror=unused-variable]
1879 | static struct mtk_jpeg_variant mtk8195_jpegenc_drvdata = {
| ^~~~~~~~~~~~~~~~~~~~~~~Fix this by just removing the #ifdef and the corresponding of_match_ptr(). They don't actually serve any purpose here since the driver is only usable when CONFIG_OF is enabled, and build testing without that is not a problem.
--- drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c +1 -3
@@ -1898,7 +1898,6 @@ static const struct mtk_jpeg_variant mtk8195_jpegdec_drvdata = { .cap_q_default_fourcc = V4L2_PIX_FMT_YUV420M, }; -#if defined(CONFIG_OF)static const struct of_device_id mtk_jpeg_match[] = { { .compatible ="mediatek,mt8173-jpgdec" ,
@@ -1924,14 +1923,13 @@ static const struct of_device_id mtk_jpeg_match[] = { };MODULE_DEVICE_TABLE (of, mtk_jpeg_match); -#endif static struct platform_driver mtk_jpeg_driver = { .probe = mtk_jpeg_probe, .remove = mtk_jpeg_remove, .driver = { .name =MTK_JPEG_NAME , - .of_match_table =of_match_ptr (mtk_jpeg_match), + .of_match_table = mtk_jpeg_match, .pm = &mtk_jpeg_pm_ops, }, };
Signature · 1 line
2.39.0
Quoted 9 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The only reference to
mtk8195_jpegenc_drvdatais inside of an #ifdef:
drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c:1879:32: error: 'mtk8195_jpegenc_drvdata' defined but not used [-Werror=unused-variable]1879 | static struct mtk_jpeg_variant mtk8195_jpegenc_drvdata = { | ^~~~~~~~~~~~~~~~~~~~~~~
Quoted 7 lines
Fix this by just removing the #ifdef and the corresponding
of_match_ptr(). They don't actually serve any purpose here since the driver is only usable whenCONFIG_OFis enabled, and build testing without that is not a problem.Fixes 934e8bccac95 ("mtk-jpegenc: support jpegenc multi-hardware")Signed-off-by Arnd Bergmann <[email protected]>