Messages in this thread | ![/](/images/icornerl.gif) | | From | Chen-Yu Tsai <> | Date | Wed, 18 Jan 2023 14:19:03 +0800 | Subject | Re: [PATCH] media: mtk_jpeg_core: avoid unused-variable warning |
| |
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>
| ![\](/images/icornerr.gif) |