]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: mtk-vcodec: venc: avoid -Wenum-compare-conditional warning
authorArnd Bergmann <arnd@arndb.de>
Fri, 18 Oct 2024 15:21:10 +0000 (15:21 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:45:21 +0000 (10:45 +0200)
commit8895a7af84527433be521ffb281c8a413edfaa0a
tree722f551d0b97f931f3d34b8288f847f932612715
parentfd7bb97ede487b9f075707b7408a9073e0d474b1
media: mtk-vcodec: venc: avoid -Wenum-compare-conditional warning

commit 07df4f23ef3ffe6fee697cd2e03623ad27108843 upstream.

This is one of three clang warnings about incompatible enum types
in a conditional expression:

drivers/media/platform/mediatek/vcodec/encoder/venc/venc_h264_if.c:597:29: error: conditional expression between different enumeration types ('enum scp_ipi_id' and 'enum ipi_id') [-Werror,-Wenum-compare-conditional]
  597 |         inst->vpu_inst.id = is_ext ? SCP_IPI_VENC_H264 : IPI_VENC_H264;
      |                                    ^ ~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~

The code is correct, so just rework it to avoid the warning.

Fixes: 0dc4b3286125 ("media: mtk-vcodec: venc: support SCP firmware")
Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Alexandre Courbot <acourbot@google.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/platform/mediatek/vcodec/encoder/venc/venc_h264_if.c