[PATCH] media: mtk_jpeg_core: avoid unused-variable warning
Chen-Yu Tsai
wenst at chromium.org
Tue Jan 17 22:19:03 PST 2023
On Wed, Jan 18, 2023 at 1:27 AM Arnd Bergmann <arnd at kernel.org> wrote:
>
> From: Arnd Bergmann <arnd at 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 at arndb.de>
Reviewed-by: Chen-Yu Tsai <wenst at chromium.org>
More information about the Linux-mediatek
mailing list