mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 19:47:49 +07:00
9eeb0ed0f3
After removing DEBUG from mtk_vcodec_util.h, some build warnings are generated as the following: .../drivers/media/platform/mtk-vcodec/vdec_vpu_if.c: In function 'vcodec_vpu_send_msg': .../drivers/media/platform/mtk-vcodec/vdec_vpu_if.c:73:11: warning: unused variable 'msg_id' [-Wunused-variable] uint32_t msg_id = *(uint32_t *)msg; ^ .../drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c: In function 'vb2ops_vdec_buf_queue': .../drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c:1129:7: warning: unused variable 'log_level' [-Wunused-variable] int log_level = ret ? 0 : 1; ^ .../drivers/media/platform/mtk-vcodec/venc_vpu_if.c: In function 'vpu_enc_send_msg': .../drivers/media/platform/mtk-vcodec/venc_vpu_if.c:82:12: warning: unused variable 'msg_id' [-Wunused-variable] uint32_t msg_id = *(uint32_t *)msg; ^ It is because mtk_vcodec_debug() and mtk_vcodec_err() are defined as empty macros. Without DEBUG definition, the variable for debugging is not used anymore. Fixing build warnings by moving the assignment of the variable to the argument of mtk_vcodec_debug() and mtk_vcodec_err(). Within the patch, build pass with/without DEBUG definition, and functions still work fine. Signed-off-by: Minghsiu Tsai <minghsiu.tsai@mediatek.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> |
||
---|---|---|
.. | ||
vdec | ||
venc | ||
Makefile | ||
mtk_vcodec_dec_drv.c | ||
mtk_vcodec_dec_pm.c | ||
mtk_vcodec_dec_pm.h | ||
mtk_vcodec_dec.c | ||
mtk_vcodec_dec.h | ||
mtk_vcodec_drv.h | ||
mtk_vcodec_enc_drv.c | ||
mtk_vcodec_enc_pm.c | ||
mtk_vcodec_enc_pm.h | ||
mtk_vcodec_enc.c | ||
mtk_vcodec_enc.h | ||
mtk_vcodec_intr.c | ||
mtk_vcodec_intr.h | ||
mtk_vcodec_util.c | ||
mtk_vcodec_util.h | ||
vdec_drv_base.h | ||
vdec_drv_if.c | ||
vdec_drv_if.h | ||
vdec_ipi_msg.h | ||
vdec_vpu_if.c | ||
vdec_vpu_if.h | ||
venc_drv_base.h | ||
venc_drv_if.c | ||
venc_drv_if.h | ||
venc_ipi_msg.h | ||
venc_vpu_if.c | ||
venc_vpu_if.h |