FAILED: patch "[PATCH] media: mtk-vcodec: venc: avoid -Wenum-compare-conditional" failed to apply to 5.15-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 07df4f23ef3ffe6fee697cd2e03623ad27108843
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025041752-utensil-affront-c113@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 07df4f23ef3ffe6fee697cd2e03623ad27108843 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <[email protected]>
Date: Fri, 18 Oct 2024 15:21:10 +0000
Subject: [PATCH] media: mtk-vcodec: venc: avoid -Wenum-compare-conditional
warning
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.
drivers/media/platform/mediatek/vcodec/encoder/venc/venc_h264_if.c +5 -1
@@ -594,7 +594,11 @@ static int h264_enc_init(struct mtk_vcodec_enc_ctx *ctx) inst->ctx = ctx; inst->vpu_inst.ctx = ctx; - inst->vpu_inst.id = is_ext ?SCP_IPI_VENC_H264 :IPI_VENC_H264 ; +if (is_ext) + inst->vpu_inst.id =SCP_IPI_VENC_H264 ; +else + inst->vpu_inst.id =IPI_VENC_H264 ; + inst->hw_base =mtk_vcodec_get_reg_addr (inst->ctx->dev->reg_base,VENC_SYS ); ret =vpu_enc_init (&inst->vpu_inst);
Sasha Levin
maintainerPATCH 1/1 media: mtk-vcodec: venc: avoid -Wenum-compare-conditional warning
From: Arnd Bergmann <[email protected]>
[ Upstream commit 07df4f23ef3ffe6fee697cd2e03623ad27108843 ]
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.
--- drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c +5 -1
@@ -513,7 +513,11 @@ static int h264_enc_init(struct mtk_vcodec_ctx *ctx) inst->ctx = ctx; inst->vpu_inst.ctx = ctx; - inst->vpu_inst.id = is_ext ?SCP_IPI_VENC_H264 :IPI_VENC_H264 ; +if (is_ext) + inst->vpu_inst.id =SCP_IPI_VENC_H264 ; +else + inst->vpu_inst.id =IPI_VENC_H264 ; + inst->hw_base =mtk_vcodec_get_reg_addr (inst->ctx,VENC_SYS );mtk_vcodec_debug_enter (inst);
Signature · 1 line
2.51.0