aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-09-24 18:07:36 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-09-26 05:50:59 -0400
commit03ce781626138e9cc972fa4fef0034a067726fb6 (patch)
treee4cd3873f08ed020addf2dd305af4891fda60931
parentf1a0c1858c63888511811a5b5661bd4d08941028 (diff)
[media] s5p-mfc: Fix several printk warnings
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:192:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘dma_addr_t’ [-Wformat=] drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:196:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘dma_addr_t’ [-Wformat=] drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:196:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat=] drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:1206:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:1206:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1757:3: warning: format ‘%zx’ expects argument of type ‘size_t’, but argument 6 has type ‘dma_addr_t’ [-Wformat=] drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1879:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=] drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:1206:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:1206:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c6
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_dec.c4
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_enc.c10
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c8
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c2
5 files changed, 15 insertions, 15 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
index 3c10e31d017b..0c885a8a0e9f 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
@@ -189,12 +189,12 @@ static inline void s5p_mfc_init_memctrl(struct s5p_mfc_dev *dev)
189{ 189{
190 if (IS_MFCV6_PLUS(dev)) { 190 if (IS_MFCV6_PLUS(dev)) {
191 mfc_write(dev, dev->bank1, S5P_FIMV_RISC_BASE_ADDRESS_V6); 191 mfc_write(dev, dev->bank1, S5P_FIMV_RISC_BASE_ADDRESS_V6);
192 mfc_debug(2, "Base Address : %08x\n", dev->bank1); 192 mfc_debug(2, "Base Address : %pad\n", &dev->bank1);
193 } else { 193 } else {
194 mfc_write(dev, dev->bank1, S5P_FIMV_MC_DRAMBASE_ADR_A); 194 mfc_write(dev, dev->bank1, S5P_FIMV_MC_DRAMBASE_ADR_A);
195 mfc_write(dev, dev->bank2, S5P_FIMV_MC_DRAMBASE_ADR_B); 195 mfc_write(dev, dev->bank2, S5P_FIMV_MC_DRAMBASE_ADR_B);
196 mfc_debug(2, "Bank1: %08x, Bank2: %08x\n", 196 mfc_debug(2, "Bank1: %pad, Bank2: %pad\n",
197 dev->bank1, dev->bank2); 197 &dev->bank1, &dev->bank2);
198 } 198 }
199} 199}
200 200
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index 77eb952a744a..a98fe023deaf 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -1202,7 +1202,7 @@ void s5p_mfc_dec_init(struct s5p_mfc_ctx *ctx)
1202 else 1202 else
1203 f.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_NV12MT; 1203 f.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_NV12MT;
1204 ctx->dst_fmt = find_format(&f, MFC_FMT_RAW); 1204 ctx->dst_fmt = find_format(&f, MFC_FMT_RAW);
1205 mfc_debug(2, "Default src_fmt is %x, dest_fmt is %x\n", 1205 mfc_debug(2, "Default src_fmt is %p, dest_fmt is %p\n",
1206 (unsigned int)ctx->src_fmt, (unsigned int)ctx->dst_fmt); 1206 ctx->src_fmt, ctx->dst_fmt);
1207} 1207}
1208 1208
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
index adffdb37746b..a904a1c7bb21 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
@@ -1750,13 +1750,13 @@ static int check_vb_with_fmt(struct s5p_mfc_fmt *fmt, struct vb2_buffer *vb)
1750 return -EINVAL; 1750 return -EINVAL;
1751 } 1751 }
1752 for (i = 0; i < fmt->num_planes; i++) { 1752 for (i = 0; i < fmt->num_planes; i++) {
1753 if (!vb2_dma_contig_plane_dma_addr(vb, i)) { 1753 dma_addr_t dma = vb2_dma_contig_plane_dma_addr(vb, i);
1754 if (!dma) {
1754 mfc_err("failed to get plane cookie\n"); 1755 mfc_err("failed to get plane cookie\n");
1755 return -EINVAL; 1756 return -EINVAL;
1756 } 1757 }
1757 mfc_debug(2, "index: %d, plane[%d] cookie: 0x%08zx\n", 1758 mfc_debug(2, "index: %d, plane[%d] cookie: %pad\n",
1758 vb->v4l2_buf.index, i, 1759 vb->v4l2_buf.index, i, &dma);
1759 vb2_dma_contig_plane_dma_addr(vb, i));
1760 } 1760 }
1761 return 0; 1761 return 0;
1762} 1762}
@@ -1876,7 +1876,7 @@ static int s5p_mfc_buf_prepare(struct vb2_buffer *vb)
1876 ret = check_vb_with_fmt(ctx->dst_fmt, vb); 1876 ret = check_vb_with_fmt(ctx->dst_fmt, vb);
1877 if (ret < 0) 1877 if (ret < 0)
1878 return ret; 1878 return ret;
1879 mfc_debug(2, "plane size: %ld, dst size: %d\n", 1879 mfc_debug(2, "plane size: %ld, dst size: %zu\n",
1880 vb2_plane_size(vb, 0), ctx->enc_dst_buf_size); 1880 vb2_plane_size(vb, 0), ctx->enc_dst_buf_size);
1881 if (vb2_plane_size(vb, 0) < ctx->enc_dst_buf_size) { 1881 if (vb2_plane_size(vb, 0) < ctx->enc_dst_buf_size) {
1882 mfc_err("plane size is too small for capture\n"); 1882 mfc_err("plane size is too small for capture\n");
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
index 90e3d61c1b59..7cf07963187d 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
@@ -567,7 +567,7 @@ static int s5p_mfc_set_enc_ref_buffer_v5(struct s5p_mfc_ctx *ctx)
567 enc_ref_c_size = ALIGN(guard_width * guard_height, 567 enc_ref_c_size = ALIGN(guard_width * guard_height,
568 S5P_FIMV_NV12MT_SALIGN); 568 S5P_FIMV_NV12MT_SALIGN);
569 } 569 }
570 mfc_debug(2, "buf_size1: %zd, buf_size2: %zd\n", buf_size1, buf_size2); 570 mfc_debug(2, "buf_size1: %zu, buf_size2: %zu\n", buf_size1, buf_size2);
571 switch (ctx->codec_mode) { 571 switch (ctx->codec_mode) {
572 case S5P_MFC_CODEC_H264_ENC: 572 case S5P_MFC_CODEC_H264_ENC:
573 for (i = 0; i < 2; i++) { 573 for (i = 0; i < 2; i++) {
@@ -606,7 +606,7 @@ static int s5p_mfc_set_enc_ref_buffer_v5(struct s5p_mfc_ctx *ctx)
606 S5P_FIMV_H264_NBOR_INFO_ADR); 606 S5P_FIMV_H264_NBOR_INFO_ADR);
607 buf_addr1 += S5P_FIMV_ENC_NBORINFO_SIZE; 607 buf_addr1 += S5P_FIMV_ENC_NBORINFO_SIZE;
608 buf_size1 -= S5P_FIMV_ENC_NBORINFO_SIZE; 608 buf_size1 -= S5P_FIMV_ENC_NBORINFO_SIZE;
609 mfc_debug(2, "buf_size1: %zd, buf_size2: %zd\n", 609 mfc_debug(2, "buf_size1: %zu, buf_size2: %zu\n",
610 buf_size1, buf_size2); 610 buf_size1, buf_size2);
611 break; 611 break;
612 case S5P_MFC_CODEC_MPEG4_ENC: 612 case S5P_MFC_CODEC_MPEG4_ENC:
@@ -637,7 +637,7 @@ static int s5p_mfc_set_enc_ref_buffer_v5(struct s5p_mfc_ctx *ctx)
637 S5P_FIMV_MPEG4_ACDC_COEF_ADR); 637 S5P_FIMV_MPEG4_ACDC_COEF_ADR);
638 buf_addr1 += S5P_FIMV_ENC_ACDCCOEF_SIZE; 638 buf_addr1 += S5P_FIMV_ENC_ACDCCOEF_SIZE;
639 buf_size1 -= S5P_FIMV_ENC_ACDCCOEF_SIZE; 639 buf_size1 -= S5P_FIMV_ENC_ACDCCOEF_SIZE;
640 mfc_debug(2, "buf_size1: %zd, buf_size2: %zd\n", 640 mfc_debug(2, "buf_size1: %zu, buf_size2: %zu\n",
641 buf_size1, buf_size2); 641 buf_size1, buf_size2);
642 break; 642 break;
643 case S5P_MFC_CODEC_H263_ENC: 643 case S5P_MFC_CODEC_H263_ENC:
@@ -663,7 +663,7 @@ static int s5p_mfc_set_enc_ref_buffer_v5(struct s5p_mfc_ctx *ctx)
663 mfc_write(dev, OFFSETA(buf_addr1), S5P_FIMV_H263_ACDC_COEF_ADR); 663 mfc_write(dev, OFFSETA(buf_addr1), S5P_FIMV_H263_ACDC_COEF_ADR);
664 buf_addr1 += S5P_FIMV_ENC_ACDCCOEF_SIZE; 664 buf_addr1 += S5P_FIMV_ENC_ACDCCOEF_SIZE;
665 buf_size1 -= S5P_FIMV_ENC_ACDCCOEF_SIZE; 665 buf_size1 -= S5P_FIMV_ENC_ACDCCOEF_SIZE;
666 mfc_debug(2, "buf_size1: %zd, buf_size2: %zd\n", 666 mfc_debug(2, "buf_size1: %zu, buf_size2: %zu\n",
667 buf_size1, buf_size2); 667 buf_size1, buf_size2);
668 break; 668 break;
669 default: 669 default:
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c
index 89de7a6daa5b..8798b14bacce 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c
@@ -100,7 +100,7 @@ static int s5p_mfc_alloc_codec_buffers_v6(struct s5p_mfc_ctx *ctx)
100 mb_width, mb_height), 100 mb_width, mb_height),
101 S5P_FIMV_ME_BUFFER_ALIGN_V6); 101 S5P_FIMV_ME_BUFFER_ALIGN_V6);
102 102
103 mfc_debug(2, "recon luma size: %zd chroma size: %zd\n", 103 mfc_debug(2, "recon luma size: %zu chroma size: %zu\n",
104 ctx->luma_dpb_size, ctx->chroma_dpb_size); 104 ctx->luma_dpb_size, ctx->chroma_dpb_size);
105 } else { 105 } else {
106 return -EINVAL; 106 return -EINVAL;