linux/drivers/media/platform/mtk-vcodec
Minghsiu Tsai 9eeb0ed0f3 [media] mtk-vcodec: fix build warnings without DEBUG
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>
2017-02-08 12:08:20 -02:00
..
vdec [media] vcodec: mediatek: Add Mediatek VP9 Video Decoder Driver 2016-10-21 12:09:32 -02:00
venc [media] mtk-vcodec: use designated initializers 2017-01-31 07:42:56 -02:00
Makefile [media] vcodec: mediatek: Add Mediatek VP9 Video Decoder Driver 2016-10-21 12:09:32 -02:00
mtk_vcodec_dec.c [media] mtk-vcodec: fix build warnings without DEBUG 2017-02-08 12:08:20 -02:00
mtk_vcodec_dec.h [media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver 2016-10-21 10:49:26 -02:00
mtk_vcodec_dec_drv.c [media] mtk-vcodec: use V4L2_DEC_CMD_STOP to implement flush 2017-02-03 07:49:24 -02:00
mtk_vcodec_dec_pm.c [media] mtk-vcodec: fix some smatch warnings 2016-10-21 12:09:23 -02:00
mtk_vcodec_dec_pm.h [media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver 2016-10-21 10:49:26 -02:00
mtk_vcodec_drv.h [media] mtk-vcodec: use V4L2_DEC_CMD_STOP to implement flush 2017-02-03 07:49:24 -02:00
mtk_vcodec_enc.c Linux 4.8 2016-10-05 16:43:53 -03:00
mtk_vcodec_enc.h
mtk_vcodec_enc_drv.c [media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver 2016-10-21 10:49:26 -02:00
mtk_vcodec_enc_pm.c [media] vcodec: mediatek: Fix return value check in mtk_vcodec_init_enc_pm() 2016-07-13 08:00:57 -03:00
mtk_vcodec_enc_pm.h
mtk_vcodec_intr.c [media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver 2016-10-21 10:49:26 -02:00
mtk_vcodec_intr.h [media] vcodec:mediatek:code refine for v4l2 Encoder driver 2016-08-24 11:20:50 -03:00
mtk_vcodec_util.c [media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver 2016-10-21 10:49:26 -02:00
mtk_vcodec_util.h [media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver 2016-10-21 10:49:26 -02:00
vdec_drv_base.h [media] vcodec: mediatek: Add Mediatek VP9 Video Decoder Driver 2016-10-21 12:09:32 -02:00
vdec_drv_if.c [media] vcodec: mediatek: Add Mediatek VP9 Video Decoder Driver 2016-10-21 12:09:32 -02:00
vdec_drv_if.h [media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver 2016-10-21 10:49:26 -02:00
vdec_ipi_msg.h [media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver 2016-10-21 10:49:26 -02:00
vdec_vpu_if.c [media] mtk-vcodec: fix build warnings without DEBUG 2017-02-08 12:08:20 -02:00
vdec_vpu_if.h [media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver 2016-10-21 10:49:26 -02:00
venc_drv_base.h
venc_drv_if.c [media] mtk-vcodec: constify venc_common_if structures 2016-08-24 08:46:19 -03:00
venc_drv_if.h
venc_ipi_msg.h
venc_vpu_if.c [media] mtk-vcodec: fix build warnings without DEBUG 2017-02-08 12:08:20 -02:00
venc_vpu_if.h