* [PATCH] media: mtk_jpeg_core: avoid unused-variable warning
@ 2023-01-17 17:26 Arnd Bergmann
2023-01-18 6:19 ` Chen-Yu Tsai
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2023-01-17 17:26 UTC (permalink / raw)
To: Bin Liu, Mauro Carvalho Chehab
Cc: Arnd Bergmann, Matthias Brugger, Hans Verkuil, kyrie wu,
irui wang, Dan Carpenter, Sakari Ailus, Colin Ian King,
linux-media, linux-arm-kernel, linux-mediatek, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
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.
Fixes: 934e8bccac95 ("mtk-jpegenc: support jpegenc multi-hardware")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
index 969516a940ba..bd12e73492e5 100644
--- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
+++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
@@ -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,
},
};
--
2.39.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: mtk_jpeg_core: avoid unused-variable warning
2023-01-17 17:26 [PATCH] media: mtk_jpeg_core: avoid unused-variable warning Arnd Bergmann
@ 2023-01-18 6:19 ` Chen-Yu Tsai
0 siblings, 0 replies; 2+ messages in thread
From: Chen-Yu Tsai @ 2023-01-18 6:19 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Bin Liu, Mauro Carvalho Chehab, Arnd Bergmann, Matthias Brugger,
Hans Verkuil, kyrie wu, irui wang, Dan Carpenter, Sakari Ailus,
Colin Ian King, linux-media, linux-arm-kernel, linux-mediatek,
linux-kernel
On Wed, Jan 18, 2023 at 1:27 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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.
>
> Fixes: 934e8bccac95 ("mtk-jpegenc: support jpegenc multi-hardware")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-18 6:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-17 17:26 [PATCH] media: mtk_jpeg_core: avoid unused-variable warning Arnd Bergmann
2023-01-18 6:19 ` Chen-Yu Tsai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).