Skip to content

Commit e13f7d5

Browse files
committed
[media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64
When compiled on x86_64, several warnings popup: drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:476:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t’ [-Wformat=] drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:480:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t’ [-Wformat=] drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:485:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘size_t’ [-Wformat=] drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:493:2: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘size_t’ [-Wformat=] drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:570:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat=] drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:570:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=] drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:609:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat=] drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:609:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=] drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:640:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat=] drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:640:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=] drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:666:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat=] drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:666:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
1 parent 0db3241 commit e13f7d5

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -473,24 +473,24 @@ static int s5p_mfc_set_dec_frame_buffer_v5(struct s5p_mfc_ctx *ctx)
473473
frame_size_mv);
474474
for (i = 0; i < ctx->total_dpb_count; i++) {
475475
/* Bank2 */
476-
mfc_debug(2, "Luma %d: %x\n", i,
476+
mfc_debug(2, "Luma %d: %zx\n", i,
477477
ctx->dst_bufs[i].cookie.raw.luma);
478478
mfc_write(dev, OFFSETB(ctx->dst_bufs[i].cookie.raw.luma),
479479
S5P_FIMV_DEC_LUMA_ADR + i * 4);
480-
mfc_debug(2, "\tChroma %d: %x\n", i,
480+
mfc_debug(2, "\tChroma %d: %zx\n", i,
481481
ctx->dst_bufs[i].cookie.raw.chroma);
482482
mfc_write(dev, OFFSETA(ctx->dst_bufs[i].cookie.raw.chroma),
483483
S5P_FIMV_DEC_CHROMA_ADR + i * 4);
484484
if (ctx->codec_mode == S5P_MFC_CODEC_H264_DEC) {
485-
mfc_debug(2, "\tBuf2: %x, size: %d\n",
485+
mfc_debug(2, "\tBuf2: %zx, size: %d\n",
486486
buf_addr2, buf_size2);
487487
mfc_write(dev, OFFSETB(buf_addr2),
488488
S5P_FIMV_H264_MV_ADR + i * 4);
489489
buf_addr2 += frame_size_mv;
490490
buf_size2 -= frame_size_mv;
491491
}
492492
}
493-
mfc_debug(2, "Buf1: %u, buf_size1: %d\n", buf_addr1, buf_size1);
493+
mfc_debug(2, "Buf1: %zu, buf_size1: %d\n", buf_addr1, buf_size1);
494494
mfc_debug(2, "Buf 1/2 size after: %d/%d (frames %d)\n",
495495
buf_size1, buf_size2, ctx->total_dpb_count);
496496
if (buf_size1 < 0 || buf_size2 < 0) {
@@ -567,7 +567,7 @@ static int s5p_mfc_set_enc_ref_buffer_v5(struct s5p_mfc_ctx *ctx)
567567
enc_ref_c_size = ALIGN(guard_width * guard_height,
568568
S5P_FIMV_NV12MT_SALIGN);
569569
}
570-
mfc_debug(2, "buf_size1: %d, buf_size2: %d\n", buf_size1, buf_size2);
570+
mfc_debug(2, "buf_size1: %zd, buf_size2: %zd\n", buf_size1, buf_size2);
571571
switch (ctx->codec_mode) {
572572
case S5P_MFC_CODEC_H264_ENC:
573573
for (i = 0; i < 2; i++) {
@@ -606,7 +606,7 @@ static int s5p_mfc_set_enc_ref_buffer_v5(struct s5p_mfc_ctx *ctx)
606606
S5P_FIMV_H264_NBOR_INFO_ADR);
607607
buf_addr1 += S5P_FIMV_ENC_NBORINFO_SIZE;
608608
buf_size1 -= S5P_FIMV_ENC_NBORINFO_SIZE;
609-
mfc_debug(2, "buf_size1: %d, buf_size2: %d\n",
609+
mfc_debug(2, "buf_size1: %zd, buf_size2: %zd\n",
610610
buf_size1, buf_size2);
611611
break;
612612
case S5P_MFC_CODEC_MPEG4_ENC:
@@ -637,7 +637,7 @@ static int s5p_mfc_set_enc_ref_buffer_v5(struct s5p_mfc_ctx *ctx)
637637
S5P_FIMV_MPEG4_ACDC_COEF_ADR);
638638
buf_addr1 += S5P_FIMV_ENC_ACDCCOEF_SIZE;
639639
buf_size1 -= S5P_FIMV_ENC_ACDCCOEF_SIZE;
640-
mfc_debug(2, "buf_size1: %d, buf_size2: %d\n",
640+
mfc_debug(2, "buf_size1: %zd, buf_size2: %zd\n",
641641
buf_size1, buf_size2);
642642
break;
643643
case S5P_MFC_CODEC_H263_ENC:
@@ -663,7 +663,7 @@ static int s5p_mfc_set_enc_ref_buffer_v5(struct s5p_mfc_ctx *ctx)
663663
mfc_write(dev, OFFSETA(buf_addr1), S5P_FIMV_H263_ACDC_COEF_ADR);
664664
buf_addr1 += S5P_FIMV_ENC_ACDCCOEF_SIZE;
665665
buf_size1 -= S5P_FIMV_ENC_ACDCCOEF_SIZE;
666-
mfc_debug(2, "buf_size1: %d, buf_size2: %d\n",
666+
mfc_debug(2, "buf_size1: %zd, buf_size2: %zd\n",
667667
buf_size1, buf_size2);
668668
break;
669669
default:

0 commit comments

Comments
 (0)