From 1a4261ad3bb434afb8f216bd6de1f32eeaa1a647 Mon Sep 17 00:00:00 2001 From: Sunyoung Kang Date: Fri, 13 Jul 2018 17:59:29 +0900 Subject: [PATCH] [COMMON] media: mfc: fix build error when gcc Change-Id: I5cfd2be4d326549215695a1d78012e239a69647a Signed-off-by: Sunyoung Kang --- drivers/media/platform/exynos/mfc/mfc_buf.c | 1 - drivers/media/platform/exynos/mfc/mfc_cmd.c | 1 - drivers/media/platform/exynos/mfc/mfc_dec_v4l2.c | 1 - drivers/media/platform/exynos/mfc/mfc_dec_vb2.c | 8 +++----- drivers/media/platform/exynos/mfc/mfc_enc_vb2.c | 6 +++--- drivers/media/platform/exynos/mfc/mfc_hw_reg_api.c | 4 ++-- drivers/media/platform/exynos/mfc/mfc_isr.c | 1 - drivers/media/platform/exynos/mfc/mfc_nal_q.c | 11 ++++------- drivers/media/platform/exynos/mfc/mfc_otf.c | 2 +- drivers/media/platform/exynos/mfc/mfc_queue.c | 4 ++-- drivers/media/platform/exynos/mfc/mfc_reg_api.c | 2 +- drivers/media/platform/exynos/mfc/mfc_run.c | 5 +---- drivers/media/platform/exynos/mfc/mfc_utils.c | 3 --- 13 files changed, 17 insertions(+), 32 deletions(-) diff --git a/drivers/media/platform/exynos/mfc/mfc_buf.c b/drivers/media/platform/exynos/mfc/mfc_buf.c index 6d5f9340e156..c7a366ba8d7b 100644 --- a/drivers/media/platform/exynos/mfc/mfc_buf.c +++ b/drivers/media/platform/exynos/mfc/mfc_buf.c @@ -165,7 +165,6 @@ void mfc_release_instance_context(struct mfc_ctx *ctx) static void __mfc_dec_calc_codec_buffer_size(struct mfc_ctx *ctx) { struct mfc_dec *dec; - int i; dec = ctx->dec_priv; diff --git a/drivers/media/platform/exynos/mfc/mfc_cmd.c b/drivers/media/platform/exynos/mfc/mfc_cmd.c index 6fcf7ae22bd0..5a0a1e79b5e1 100644 --- a/drivers/media/platform/exynos/mfc/mfc_cmd.c +++ b/drivers/media/platform/exynos/mfc/mfc_cmd.c @@ -271,7 +271,6 @@ int mfc_cmd_enc_seq_header(struct mfc_ctx *ctx) int mfc_cmd_dec_init_buffers(struct mfc_ctx *ctx) { struct mfc_dev *dev = ctx->dev; - struct mfc_dec *dec = ctx->dec_priv; unsigned int reg = 0, pix_val; int ret; diff --git a/drivers/media/platform/exynos/mfc/mfc_dec_v4l2.c b/drivers/media/platform/exynos/mfc/mfc_dec_v4l2.c index 70d082cecadf..6f43039edad5 100644 --- a/drivers/media/platform/exynos/mfc/mfc_dec_v4l2.c +++ b/drivers/media/platform/exynos/mfc/mfc_dec_v4l2.c @@ -1012,7 +1012,6 @@ static int mfc_dec_g_ctrl(struct file *file, void *priv, static int mfc_dec_s_ctrl(struct file *file, void *priv, struct v4l2_control *ctrl) { - struct mfc_dev *dev = video_drvdata(file); struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data); struct mfc_dec *dec = ctx->dec_priv; struct mfc_ctx_ctrl *ctx_ctrl; diff --git a/drivers/media/platform/exynos/mfc/mfc_dec_vb2.c b/drivers/media/platform/exynos/mfc/mfc_dec_vb2.c index 6b849445a2ec..1f411c334b0d 100644 --- a/drivers/media/platform/exynos/mfc/mfc_dec_vb2.c +++ b/drivers/media/platform/exynos/mfc/mfc_dec_vb2.c @@ -108,8 +108,6 @@ static int mfc_dec_buf_init(struct vb2_buffer *vb) { struct vb2_queue *vq = vb->vb2_queue; struct mfc_ctx *ctx = vq->drv_priv; - struct mfc_dev *dev = ctx->dev; - struct mfc_dec *dec = ctx->dec_priv; struct mfc_buf *buf = vb_to_mfc_buf(vb); dma_addr_t start_raw; int i, ret; @@ -186,7 +184,7 @@ static int mfc_dec_buf_prepare(struct vb2_buffer *vb) mfc_debug(2, "[FRAME] single plane vb size: %lu, calc size: %d\n", buf_size, raw->total_plane_size); if (buf_size < raw->total_plane_size) { - mfc_err_ctx("[FRAME] single plane size(%d) is smaller than (%d)\n", + mfc_err_ctx("[FRAME] single plane size(%lu) is smaller than (%d)\n", buf_size, raw->total_plane_size); return -EINVAL; } @@ -196,7 +194,7 @@ static int mfc_dec_buf_prepare(struct vb2_buffer *vb) mfc_debug(2, "[FRAME] plane[%d] vb size: %lu, calc size: %d\n", i, buf_size, raw->plane_size[i]); if (buf_size < raw->plane_size[i]) { - mfc_err_ctx("[FRAME] plane[%d] size(%d) is smaller than (%d)\n", + mfc_err_ctx("[FRAME] plane[%d] size(%lu) is smaller than (%d)\n", i, buf_size, raw->plane_size[i]); return -EINVAL; } @@ -208,7 +206,7 @@ static int mfc_dec_buf_prepare(struct vb2_buffer *vb) buf_size, dec->src_buf_size); if (buf_size < dec->src_buf_size) { - mfc_err_ctx("[STREAM] size(%d) is smaller than (%d)\n", + mfc_err_ctx("[STREAM] size(%lu) is smaller than (%d)\n", buf_size, dec->src_buf_size); return -EINVAL; } diff --git a/drivers/media/platform/exynos/mfc/mfc_enc_vb2.c b/drivers/media/platform/exynos/mfc/mfc_enc_vb2.c index 75f0b4b23156..97a8a361f354 100644 --- a/drivers/media/platform/exynos/mfc/mfc_enc_vb2.c +++ b/drivers/media/platform/exynos/mfc/mfc_enc_vb2.c @@ -169,7 +169,7 @@ static int mfc_enc_buf_prepare(struct vb2_buffer *vb) buf_size, enc->dst_buf_size); if (buf_size < enc->dst_buf_size) { - mfc_err_ctx("[STREAM] size(%d) is smaller than (%d)\n", + mfc_err_ctx("[STREAM] size(%lu) is smaller than (%d)\n", buf_size, enc->dst_buf_size); return -EINVAL; } @@ -182,7 +182,7 @@ static int mfc_enc_buf_prepare(struct vb2_buffer *vb) mfc_debug(2, "[FRAME] single plane vb size: %lu, calc size: %d\n", buf_size, raw->total_plane_size); if (buf_size < raw->total_plane_size) { - mfc_err_ctx("[FRAME] single plane size(%d) is smaller than (%d)\n", + mfc_err_ctx("[FRAME] single plane size(%lu) is smaller than (%d)\n", buf_size, raw->total_plane_size); return -EINVAL; } @@ -192,7 +192,7 @@ static int mfc_enc_buf_prepare(struct vb2_buffer *vb) mfc_debug(2, "[FRAME] plane[%d] vb size: %lu, calc size: %d\n", i, buf_size, raw->plane_size[i]); if (buf_size < raw->plane_size[i]) { - mfc_err_ctx("[FRAME] plane[%d] size(%d) is smaller than (%d)\n", + mfc_err_ctx("[FRAME] plane[%d] size(%lu) is smaller than (%d)\n", i, buf_size, raw->plane_size[i]); return -EINVAL; } diff --git a/drivers/media/platform/exynos/mfc/mfc_hw_reg_api.c b/drivers/media/platform/exynos/mfc/mfc_hw_reg_api.c index 2ad7d472a1ef..7465a97e657d 100644 --- a/drivers/media/platform/exynos/mfc/mfc_hw_reg_api.c +++ b/drivers/media/platform/exynos/mfc/mfc_hw_reg_api.c @@ -48,9 +48,9 @@ void mfc_set_risc_base_addr(struct mfc_dev *dev, MFC_WRITEL(fw_buf->daddr, MFC_REG_RISC_BASE_ADDRESS); mfc_debug(2, "[MEMINFO][F/W] %s Base Address : %#x\n", - buf_type == MFCBUF_DRM ? "DRM" : "NORMAL", fw_buf->daddr); + buf_type == MFCBUF_DRM ? "DRM" : "NORMAL", (u32)fw_buf->daddr); MFC_TRACE_DEV("%s F/W Base Address : %#x\n", - buf_type == MFCBUF_DRM ? "DRM" : "NORMAL", fw_buf->daddr); + buf_type == MFCBUF_DRM ? "DRM" : "NORMAL", (u32)fw_buf->daddr); } void mfc_cmd_host2risc(struct mfc_dev *dev, int cmd) diff --git a/drivers/media/platform/exynos/mfc/mfc_isr.c b/drivers/media/platform/exynos/mfc/mfc_isr.c index c9c5646d8358..1205c71033e5 100644 --- a/drivers/media/platform/exynos/mfc/mfc_isr.c +++ b/drivers/media/platform/exynos/mfc/mfc_isr.c @@ -726,7 +726,6 @@ leave_handle_frame: static void __mfc_handle_stream_copy_timestamp(struct mfc_ctx *ctx, struct mfc_buf *src_mb) { - struct mfc_dev *dev = ctx->dev; struct mfc_enc *enc = ctx->enc_priv; struct mfc_enc_params *p = &enc->params; struct mfc_buf *dst_mb; diff --git a/drivers/media/platform/exynos/mfc/mfc_nal_q.c b/drivers/media/platform/exynos/mfc/mfc_nal_q.c index 691c63cb64fc..4fba0451d240 100644 --- a/drivers/media/platform/exynos/mfc/mfc_nal_q.c +++ b/drivers/media/platform/exynos/mfc/mfc_nal_q.c @@ -621,7 +621,7 @@ static int __mfc_nal_q_run_in_buf_enc(struct mfc_ctx *ctx, EncoderInputStr *pInS for (i = 0; i < raw->num_planes; i++) { pInStr->Frame2bitAddr[i] = addr_2bit[i]; - mfc_debug(2, "[NALQ][BUFINFO] ctx[%d] set src 2bit addr[%d]: 0x%08llx\n", + mfc_debug(2, "[NALQ][BUFINFO] ctx[%d] set src index:%d, 2bit addr[%d]: 0x%08llx\n", ctx->num, index, i, addr_2bit[i]); } } else if (ctx->src_fmt->fourcc == V4L2_PIX_FMT_NV16M_S10B || @@ -631,7 +631,7 @@ static int __mfc_nal_q_run_in_buf_enc(struct mfc_ctx *ctx, EncoderInputStr *pInS for (i = 0; i < raw->num_planes; i++) { pInStr->Frame2bitAddr[i] = addr_2bit[i]; - mfc_debug(2, "[NALQ][BUFINFO] ctx[%d] set src 2bit addr[%d]: 0x%08llx\n", + mfc_debug(2, "[NALQ][BUFINFO] ctx[%d] set src index:%d, 2bit addr[%d]: 0x%08llx\n", ctx->num, index, i, addr_2bit[i]); } } @@ -651,7 +651,7 @@ static int __mfc_nal_q_run_in_buf_enc(struct mfc_ctx *ctx, EncoderInputStr *pInS if (call_cop(ctx, set_buf_ctrls_val_nal_q_enc, ctx, &ctx->src_ctrls[index], pInStr) < 0) mfc_err_ctx("[NALQ] failed in set_buf_ctrals_val in nal q\n"); - mfc_debug(2, "[NALQ][BUFINFO] ctx[%d] set dst index: %d, addr: 0x%08llx\n", + mfc_debug(2, "[NALQ][BUFINFO] ctx[%d] set dst index: %d, addr: 0x%08x\n", ctx->num, dst_mb->vb.vb2_buf.index, pInStr->StreamBufferAddr); mfc_debug(2, "[NALQ] input queue, src_buf_queue -> src_buf_nal_queue, index:%d\n", src_mb->vb.vb2_buf.index); @@ -727,7 +727,7 @@ static int __mfc_nal_q_run_in_buf_dec(struct mfc_ctx *ctx, DecoderInputStr *pInS mfc_debug(2, "[NALQ][BUFINFO] ctx[%d] set src index: %d, addr: 0x%08llx\n", ctx->num, src_index, buf_addr); - mfc_debug(2, "[NALQ][STREAM] strm_size: %#lx(%d), buf_size: %u\n", + mfc_debug(2, "[NALQ][STREAM] strm_size: %#x(%d), buf_size: %u\n", strm_size, strm_size, cpb_buf_size); if (strm_size == 0) @@ -795,7 +795,6 @@ static void __mfc_nal_q_get_enc_frame_buffer(struct mfc_ctx *ctx, static void __mfc_nal_q_handle_stream_copy_timestamp(struct mfc_ctx *ctx, struct mfc_buf *src_mb) { - struct mfc_dev *dev = ctx->dev; struct mfc_enc *enc = ctx->enc_priv; struct mfc_enc_params *p = &enc->params; struct mfc_buf *dst_mb; @@ -1076,8 +1075,6 @@ static void __mfc_nal_q_handle_ref_frame(struct mfc_ctx *ctx, DecoderOutputStr * static void __mfc_nal_q_handle_frame_copy_timestamp(struct mfc_ctx *ctx, DecoderOutputStr *pOutStr) { - struct mfc_dec *dec = ctx->dec_priv; - struct mfc_dev *dev = ctx->dev; struct mfc_buf *ref_mb, *src_mb; dma_addr_t dec_y_addr; diff --git a/drivers/media/platform/exynos/mfc/mfc_otf.c b/drivers/media/platform/exynos/mfc/mfc_otf.c index 29530f5dc25b..c75d05be88cb 100644 --- a/drivers/media/platform/exynos/mfc/mfc_otf.c +++ b/drivers/media/platform/exynos/mfc/mfc_otf.c @@ -174,9 +174,9 @@ static int __mfc_otf_init_hwfc_buf(struct mfc_ctx *ctx) { #ifdef CONFIG_VIDEO_EXYNOS_REPEATER struct shared_buffer_info *shared_buf_info; -#endif struct _otf_handle *handle = ctx->otf_handle; struct _otf_buf_info *buf_info = &handle->otf_buf_info; +#endif mfc_debug_enter(); diff --git a/drivers/media/platform/exynos/mfc/mfc_queue.c b/drivers/media/platform/exynos/mfc/mfc_queue.c index 53d7e544097f..eff0319284ef 100644 --- a/drivers/media/platform/exynos/mfc/mfc_queue.c +++ b/drivers/media/platform/exynos/mfc/mfc_queue.c @@ -951,12 +951,12 @@ int mfc_check_buf_vb_flag(struct mfc_ctx *ctx, enum mfc_vb_flag f) mfc_debug(2, "[BUFINFO] addr[0]: 0x%08llx\n", mfc_buf->addr[0][0]); if (mfc_check_vb_flag(mfc_buf, f)) { - mfc_debug(2, "find flag %ld\n", f); + mfc_debug(2, "find flag %d\n", f); spin_unlock_irqrestore(&ctx->buf_queue_lock, flags); return 1; } - mfc_debug(4, "no flag %ld\n", f); + mfc_debug(4, "no flag %d\n", f); spin_unlock_irqrestore(&ctx->buf_queue_lock, flags); return 0; diff --git a/drivers/media/platform/exynos/mfc/mfc_reg_api.c b/drivers/media/platform/exynos/mfc/mfc_reg_api.c index 1b7aa749ecd9..263c663dcc56 100644 --- a/drivers/media/platform/exynos/mfc/mfc_reg_api.c +++ b/drivers/media/platform/exynos/mfc/mfc_reg_api.c @@ -275,7 +275,7 @@ int mfc_set_dec_stream_buffer(struct mfc_ctx *ctx, struct mfc_buf *mfc_buf, mfc_debug(2, "[BUFINFO] ctx[%d] set src index: %d, addr: 0x%08llx\n", ctx->num, index, addr); - mfc_debug(2, "[STREAM] strm_size: %#lx(%d), buf_size: %u, offset: %u\n", + mfc_debug(2, "[STREAM] strm_size: %#x(%d), buf_size: %u, offset: %u\n", strm_size, strm_size, cpb_buf_size, start_num_byte); if (strm_size == 0) diff --git a/drivers/media/platform/exynos/mfc/mfc_run.c b/drivers/media/platform/exynos/mfc/mfc_run.c index cc1eb8f26f01..df6d262c2c05 100644 --- a/drivers/media/platform/exynos/mfc/mfc_run.c +++ b/drivers/media/platform/exynos/mfc/mfc_run.c @@ -180,7 +180,7 @@ void mfc_run_deinit_hw(struct mfc_dev *dev) int mfc_run_sleep(struct mfc_dev *dev) { struct mfc_ctx *ctx; - int old_state, i; + int i; int need_cache_flush = 0; mfc_debug_enter(); @@ -312,7 +312,6 @@ int mfc_run_wakeup(struct mfc_dev *dev) int mfc_run_dec_init(struct mfc_ctx *ctx) { - struct mfc_dev *dev = ctx->dev; struct mfc_dec *dec = ctx->dec_priv; struct mfc_buf *src_mb; @@ -363,7 +362,6 @@ static int __mfc_check_last_frame(struct mfc_ctx *ctx, struct mfc_buf *mfc_buf) int mfc_run_dec_frame(struct mfc_ctx *ctx) { - struct mfc_dev *dev = ctx->dev; struct mfc_dec *dec = ctx->dec_priv; struct mfc_buf *src_mb, *dst_mb; int last_frame = 0; @@ -421,7 +419,6 @@ int mfc_run_dec_frame(struct mfc_ctx *ctx) int mfc_run_dec_last_frames(struct mfc_ctx *ctx) { - struct mfc_dev *dev = ctx->dev; struct mfc_dec *dec = ctx->dec_priv; struct mfc_buf *src_mb, *dst_mb; diff --git a/drivers/media/platform/exynos/mfc/mfc_utils.c b/drivers/media/platform/exynos/mfc/mfc_utils.c index b20107f3c4a0..beab76d40731 100644 --- a/drivers/media/platform/exynos/mfc/mfc_utils.c +++ b/drivers/media/platform/exynos/mfc/mfc_utils.c @@ -192,8 +192,6 @@ static void __mfc_set_linear_stride_size(struct mfc_ctx *ctx, void mfc_dec_calc_dpb_size(struct mfc_ctx *ctx) { - struct mfc_dev *dev = ctx->dev; - struct mfc_dec *dec = ctx->dec_priv; struct mfc_raw_info *raw; int i; int extra = MFC_LINEAR_BUF_SIZE; @@ -306,7 +304,6 @@ void mfc_dec_calc_dpb_size(struct mfc_ctx *ctx) void mfc_enc_calc_src_size(struct mfc_ctx *ctx) { - struct mfc_dev *dev = ctx->dev; struct mfc_raw_info *raw; unsigned int mb_width, mb_height, default_size; int i, extra; -- 2.20.1