]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] s5p-mfc: Fix several printk warnings
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 24 Sep 2014 22:07:36 +0000 (19:07 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 26 Sep 2014 09:50:59 +0000 (06:50 -0300)
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>
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c

index 3c10e31d017b9416dd9f826126a82b4942be8fb9..0c885a8a0e9fcd4341103991f5da3e788defbc89 100644 (file)
@@ -189,12 +189,12 @@ static inline void s5p_mfc_init_memctrl(struct s5p_mfc_dev *dev)
 {
        if (IS_MFCV6_PLUS(dev)) {
                mfc_write(dev, dev->bank1, S5P_FIMV_RISC_BASE_ADDRESS_V6);
-               mfc_debug(2, "Base Address : %08x\n", dev->bank1);
+               mfc_debug(2, "Base Address : %pad\n", &dev->bank1);
        } else {
                mfc_write(dev, dev->bank1, S5P_FIMV_MC_DRAMBASE_ADR_A);
                mfc_write(dev, dev->bank2, S5P_FIMV_MC_DRAMBASE_ADR_B);
-               mfc_debug(2, "Bank1: %08x, Bank2: %08x\n",
-                               dev->bank1, dev->bank2);
+               mfc_debug(2, "Bank1: %pad, Bank2: %pad\n",
+                               &dev->bank1, &dev->bank2);
        }
 }
 
index 77eb952a744ac3aea92d205121eb78aac17f7120..a98fe023deaf79e5879d3d9ae5e2317bd44204e8 100644 (file)
@@ -1202,7 +1202,7 @@ void s5p_mfc_dec_init(struct s5p_mfc_ctx *ctx)
        else
                f.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_NV12MT;
        ctx->dst_fmt = find_format(&f, MFC_FMT_RAW);
-       mfc_debug(2, "Default src_fmt is %x, dest_fmt is %x\n",
-                       (unsigned int)ctx->src_fmt, (unsigned int)ctx->dst_fmt);
+       mfc_debug(2, "Default src_fmt is %p, dest_fmt is %p\n",
+                       ctx->src_fmt, ctx->dst_fmt);
 }
 
index adffdb37746bb8376e5cac9bf47d8cf8685c7947..a904a1c7bb21e70bf8b29719a0c537b87bc0e465 100644 (file)
@@ -1750,13 +1750,13 @@ static int check_vb_with_fmt(struct s5p_mfc_fmt *fmt, struct vb2_buffer *vb)
                return -EINVAL;
        }
        for (i = 0; i < fmt->num_planes; i++) {
-               if (!vb2_dma_contig_plane_dma_addr(vb, i)) {
+               dma_addr_t dma = vb2_dma_contig_plane_dma_addr(vb, i);
+               if (!dma) {
                        mfc_err("failed to get plane cookie\n");
                        return -EINVAL;
                }
-               mfc_debug(2, "index: %d, plane[%d] cookie: 0x%08zx\n",
-                         vb->v4l2_buf.index, i,
-                         vb2_dma_contig_plane_dma_addr(vb, i));
+               mfc_debug(2, "index: %d, plane[%d] cookie: %pad\n",
+                         vb->v4l2_buf.index, i, &dma);
        }
        return 0;
 }
@@ -1876,7 +1876,7 @@ static int s5p_mfc_buf_prepare(struct vb2_buffer *vb)
                ret = check_vb_with_fmt(ctx->dst_fmt, vb);
                if (ret < 0)
                        return ret;
-               mfc_debug(2, "plane size: %ld, dst size: %d\n",
+               mfc_debug(2, "plane size: %ld, dst size: %zu\n",
                        vb2_plane_size(vb, 0), ctx->enc_dst_buf_size);
                if (vb2_plane_size(vb, 0) < ctx->enc_dst_buf_size) {
                        mfc_err("plane size is too small for capture\n");
index 90e3d61c1b59c9b706b598c83d40129b70ddc14c..7cf07963187dd33e254cc3d89db849f2ae877faf 100644 (file)
@@ -567,7 +567,7 @@ static int s5p_mfc_set_enc_ref_buffer_v5(struct s5p_mfc_ctx *ctx)
                enc_ref_c_size = ALIGN(guard_width * guard_height,
                                       S5P_FIMV_NV12MT_SALIGN);
        }
-       mfc_debug(2, "buf_size1: %zd, buf_size2: %zd\n", buf_size1, buf_size2);
+       mfc_debug(2, "buf_size1: %zu, buf_size2: %zu\n", buf_size1, buf_size2);
        switch (ctx->codec_mode) {
        case S5P_MFC_CODEC_H264_ENC:
                for (i = 0; i < 2; i++) {
@@ -606,7 +606,7 @@ static int s5p_mfc_set_enc_ref_buffer_v5(struct s5p_mfc_ctx *ctx)
                                        S5P_FIMV_H264_NBOR_INFO_ADR);
                buf_addr1 += S5P_FIMV_ENC_NBORINFO_SIZE;
                buf_size1 -= S5P_FIMV_ENC_NBORINFO_SIZE;
-               mfc_debug(2, "buf_size1: %zd, buf_size2: %zd\n",
+               mfc_debug(2, "buf_size1: %zu, buf_size2: %zu\n",
                        buf_size1, buf_size2);
                break;
        case S5P_MFC_CODEC_MPEG4_ENC:
@@ -637,7 +637,7 @@ static int s5p_mfc_set_enc_ref_buffer_v5(struct s5p_mfc_ctx *ctx)
                                                S5P_FIMV_MPEG4_ACDC_COEF_ADR);
                buf_addr1 += S5P_FIMV_ENC_ACDCCOEF_SIZE;
                buf_size1 -= S5P_FIMV_ENC_ACDCCOEF_SIZE;
-               mfc_debug(2, "buf_size1: %zd, buf_size2: %zd\n",
+               mfc_debug(2, "buf_size1: %zu, buf_size2: %zu\n",
                        buf_size1, buf_size2);
                break;
        case S5P_MFC_CODEC_H263_ENC:
@@ -663,7 +663,7 @@ static int s5p_mfc_set_enc_ref_buffer_v5(struct s5p_mfc_ctx *ctx)
                mfc_write(dev, OFFSETA(buf_addr1), S5P_FIMV_H263_ACDC_COEF_ADR);
                buf_addr1 += S5P_FIMV_ENC_ACDCCOEF_SIZE;
                buf_size1 -= S5P_FIMV_ENC_ACDCCOEF_SIZE;
-               mfc_debug(2, "buf_size1: %zd, buf_size2: %zd\n",
+               mfc_debug(2, "buf_size1: %zu, buf_size2: %zu\n",
                        buf_size1, buf_size2);
                break;
        default:
index 89de7a6daa5b4d4a175a386379aacc34ceade9b5..8798b14bacce8f1e85a658b578728a9976a549f0 100644 (file)
@@ -100,7 +100,7 @@ static int s5p_mfc_alloc_codec_buffers_v6(struct s5p_mfc_ctx *ctx)
                                                mb_width, mb_height),
                                                S5P_FIMV_ME_BUFFER_ALIGN_V6);
 
-               mfc_debug(2, "recon luma size: %zd chroma size: %zd\n",
+               mfc_debug(2, "recon luma size: %zu chroma size: %zu\n",
                          ctx->luma_dpb_size, ctx->chroma_dpb_size);
        } else {
                return -EINVAL;