* [PATCH 02/18] [media] st_rc: fix address space casting
[not found] <c8634fac0c56cfaa9bdad29d541e95b17c049c0a.1411597610.git.mchehab@osg.samsung.com>
@ 2014-09-24 22:27 ` Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 13/18] [media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64 Mauro Carvalho Chehab
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2014-09-24 22:27 UTC (permalink / raw)
To: linux-arm-kernel
drivers/media/rc/st_rc.c:107:38: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/st_rc.c:107:38: expected void const volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:107:38: got void *
drivers/media/rc/st_rc.c:110:53: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/st_rc.c:110:53: expected void const volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:110:53: got void *
drivers/media/rc/st_rc.c:116:54: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:116:54: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:116:54: got void *
drivers/media/rc/st_rc.c:120:45: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/st_rc.c:120:45: expected void const volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:120:45: got void *
drivers/media/rc/st_rc.c:121:43: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/st_rc.c:121:43: expected void const volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:121:43: got void *
drivers/media/rc/st_rc.c:150:46: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/st_rc.c:150:46: expected void const volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:150:46: got void *
drivers/media/rc/st_rc.c:153:42: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:153:42: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:153:42: got void *
drivers/media/rc/st_rc.c:174:32: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:174:32: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:174:32: got void *
drivers/media/rc/st_rc.c:177:48: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:177:48: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:177:48: got void *
drivers/media/rc/st_rc.c:187:48: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:187:48: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:187:48: got void *
drivers/media/rc/st_rc.c:204:42: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:204:42: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:204:42: got void *
drivers/media/rc/st_rc.c:205:35: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:205:35: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:205:35: got void *
drivers/media/rc/st_rc.c:215:35: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:215:35: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:215:35: got void *
drivers/media/rc/st_rc.c:216:35: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:216:35: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:216:35: got void *
drivers/media/rc/st_rc.c:269:22: warning: incorrect type in assignment (different address spaces)
drivers/media/rc/st_rc.c:269:22: expected void *base
drivers/media/rc/st_rc.c:269:22: got void [noderef] <asn:2>*
drivers/media/rc/st_rc.c:349:46: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:349:46: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:349:46: got void *
drivers/media/rc/st_rc.c:350:46: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:350:46: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:350:46: got void *
drivers/media/rc/st_rc.c:371:61: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:371:61: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:371:61: got void *
drivers/media/rc/st_rc.c:372:54: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:372:54: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:372:54: got void *
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c
index e309441a266d..0e758ae2e529 100644
--- a/drivers/media/rc/st_rc.c
+++ b/drivers/media/rc/st_rc.c
@@ -22,8 +22,8 @@ struct st_rc_device {
int irq;
int irq_wake;
struct clk *sys_clock;
- void *base; /* Register base address */
- void *rx_base;/* RX Register base address */
+ volatile void __iomem *base; /* Register base address */
+ volatile void __iomem *rx_base;/* RX Register base address */
struct rc_dev *rdev;
bool overclocking;
int sample_mult;
@@ -267,8 +267,8 @@ static int st_rc_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
rc_dev->base = devm_ioremap_resource(dev, res);
- if (IS_ERR(rc_dev->base)) {
- ret = PTR_ERR(rc_dev->base);
+ if (IS_ERR((__force void *)rc_dev->base)) {
+ ret = PTR_ERR((__force void *)rc_dev->base);
goto err;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 13/18] [media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64
[not found] <c8634fac0c56cfaa9bdad29d541e95b17c049c0a.1411597610.git.mchehab@osg.samsung.com>
2014-09-24 22:27 ` [PATCH 02/18] [media] st_rc: fix address space casting Mauro Carvalho Chehab
@ 2014-09-24 22:27 ` Mauro Carvalho Chehab
2014-09-24 23:05 ` Fabio Estevam
2014-09-24 22:27 ` [PATCH 14/18] [media] s5p_mfc_opr_v6: get rid of warnings when compiled with 64 bits Mauro Carvalho Chehab
` (2 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2014-09-24 22:27 UTC (permalink / raw)
To: linux-arm-kernel
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>
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 6234e4d70596..90e3d61c1b59 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
@@ -473,16 +473,16 @@ static int s5p_mfc_set_dec_frame_buffer_v5(struct s5p_mfc_ctx *ctx)
frame_size_mv);
for (i = 0; i < ctx->total_dpb_count; i++) {
/* Bank2 */
- mfc_debug(2, "Luma %d: %x\n", i,
+ mfc_debug(2, "Luma %d: %zx\n", i,
ctx->dst_bufs[i].cookie.raw.luma);
mfc_write(dev, OFFSETB(ctx->dst_bufs[i].cookie.raw.luma),
S5P_FIMV_DEC_LUMA_ADR + i * 4);
- mfc_debug(2, "\tChroma %d: %x\n", i,
+ mfc_debug(2, "\tChroma %d: %zx\n", i,
ctx->dst_bufs[i].cookie.raw.chroma);
mfc_write(dev, OFFSETA(ctx->dst_bufs[i].cookie.raw.chroma),
S5P_FIMV_DEC_CHROMA_ADR + i * 4);
if (ctx->codec_mode == S5P_MFC_CODEC_H264_DEC) {
- mfc_debug(2, "\tBuf2: %x, size: %d\n",
+ mfc_debug(2, "\tBuf2: %zx, size: %d\n",
buf_addr2, buf_size2);
mfc_write(dev, OFFSETB(buf_addr2),
S5P_FIMV_H264_MV_ADR + i * 4);
@@ -490,7 +490,7 @@ static int s5p_mfc_set_dec_frame_buffer_v5(struct s5p_mfc_ctx *ctx)
buf_size2 -= frame_size_mv;
}
}
- mfc_debug(2, "Buf1: %u, buf_size1: %d\n", buf_addr1, buf_size1);
+ mfc_debug(2, "Buf1: %zu, buf_size1: %d\n", buf_addr1, buf_size1);
mfc_debug(2, "Buf 1/2 size after: %d/%d (frames %d)\n",
buf_size1, buf_size2, ctx->total_dpb_count);
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)
enc_ref_c_size = ALIGN(guard_width * guard_height,
S5P_FIMV_NV12MT_SALIGN);
}
- mfc_debug(2, "buf_size1: %d, buf_size2: %d\n", buf_size1, buf_size2);
+ mfc_debug(2, "buf_size1: %zd, buf_size2: %zd\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: %d, buf_size2: %d\n",
+ mfc_debug(2, "buf_size1: %zd, buf_size2: %zd\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: %d, buf_size2: %d\n",
+ mfc_debug(2, "buf_size1: %zd, buf_size2: %zd\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: %d, buf_size2: %d\n",
+ mfc_debug(2, "buf_size1: %zd, buf_size2: %zd\n",
buf_size1, buf_size2);
break;
default:
--
1.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 14/18] [media] s5p_mfc_opr_v6: get rid of warnings when compiled with 64 bits
[not found] <c8634fac0c56cfaa9bdad29d541e95b17c049c0a.1411597610.git.mchehab@osg.samsung.com>
2014-09-24 22:27 ` [PATCH 02/18] [media] st_rc: fix address space casting Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 13/18] [media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64 Mauro Carvalho Chehab
@ 2014-09-24 22:27 ` Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 15/18] [media] s5p_mfc_opr: Fix warnings Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 16/18] s5p-mfc: Fix several printk warnings Mauro Carvalho Chehab
4 siblings, 0 replies; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2014-09-24 22:27 UTC (permalink / raw)
To: linux-arm-kernel
There are several errors related to size_t size and the usage of
unsigned int for pointers:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c: In function ?s5p_mfc_alloc_codec_buffers_v6?:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:103:3: warning: format ?%d? expects argument of type ?int?, but argument 4 has type ?size_t? [-Wformat=]
mfc_debug(2, "recon luma size: %d chroma size: %d\n",
^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:103: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_v6.c: In function ?s5p_mfc_set_dec_frame_buffer_v6?:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:472:3: warning: format ?%x? expects argument of type ?unsigned int?, but argument 5 has type ?size_t? [-Wformat=]
mfc_debug(2, "Luma %d: %x\n", i,
^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:476:3: warning: format ?%x? expects argument of type ?unsigned int?, but argument 5 has type ?size_t? [-Wformat=]
mfc_debug(2, "\tChroma %d: %x\n", i,
^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:490:4: warning: format ?%x? expects argument of type ?unsigned int?, but argument 4 has type ?size_t? [-Wformat=]
mfc_debug(2, "\tBuf1: %x, size: %d\n",
^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:498:2: warning: format ?%u? expects argument of type ?unsigned int?, but argument 4 has type ?size_t? [-Wformat=]
mfc_debug(2, "Buf1: %u, buf_size1: %d (frames %d)\n",
^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c: In function ?s5p_mfc_set_enc_ref_buffer_v6?:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:596:2: warning: format ?%u? expects argument of type ?unsigned int?, but argument 4 has type ?size_t? [-Wformat=]
mfc_debug(2, "Buf1: %u, buf_size1: %d (ref frames %d)\n",
^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c: In function ?s5p_mfc_write_info_v6?:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:1883:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
writel(data, (volatile void __iomem *)ofs);
^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c: In function ?s5p_mfc_read_info_v6?:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:1893:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ret = readl((volatile void __iomem *)ofs);
^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c: In function ?s5p_mfc_get_pic_type_top_v6?:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:2022:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
(__force unsigned int) ctx->dev->mfc_regs->d_ret_picture_tag_top);
^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c: In function ?s5p_mfc_get_pic_type_bot_v6?:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:2028:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
(__force unsigned int) ctx->dev->mfc_regs->d_ret_picture_tag_bot);
^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c: In function ?s5p_mfc_get_crop_info_h_v6?:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:2034:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
(__force unsigned int) ctx->dev->mfc_regs->d_display_crop_info1);
^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c: In function ?s5p_mfc_get_crop_info_v_v6?:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:2040:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
(__force unsigned int) ctx->dev->mfc_regs->d_display_crop_info2);
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
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 e38d78f21726..89de7a6daa5b 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)
mb_width, mb_height),
S5P_FIMV_ME_BUFFER_ALIGN_V6);
- mfc_debug(2, "recon luma size: %d chroma size: %d\n",
+ mfc_debug(2, "recon luma size: %zd chroma size: %zd\n",
ctx->luma_dpb_size, ctx->chroma_dpb_size);
} else {
return -EINVAL;
@@ -469,11 +469,11 @@ static int s5p_mfc_set_dec_frame_buffer_v6(struct s5p_mfc_ctx *ctx)
for (i = 0; i < ctx->total_dpb_count; i++) {
/* Bank2 */
- mfc_debug(2, "Luma %d: %x\n", i,
+ mfc_debug(2, "Luma %d: %zx\n", i,
ctx->dst_bufs[i].cookie.raw.luma);
writel(ctx->dst_bufs[i].cookie.raw.luma,
mfc_regs->d_first_plane_dpb + i * 4);
- mfc_debug(2, "\tChroma %d: %x\n", i,
+ mfc_debug(2, "\tChroma %d: %zx\n", i,
ctx->dst_bufs[i].cookie.raw.chroma);
writel(ctx->dst_bufs[i].cookie.raw.chroma,
mfc_regs->d_second_plane_dpb + i * 4);
@@ -487,7 +487,7 @@ static int s5p_mfc_set_dec_frame_buffer_v6(struct s5p_mfc_ctx *ctx)
align_gap = buf_addr1 - align_gap;
buf_size1 -= align_gap;
- mfc_debug(2, "\tBuf1: %x, size: %d\n",
+ mfc_debug(2, "\tBuf1: %zx, size: %d\n",
buf_addr1, buf_size1);
writel(buf_addr1, mfc_regs->d_mv_buffer + i * 4);
buf_addr1 += frame_size_mv;
@@ -495,7 +495,7 @@ static int s5p_mfc_set_dec_frame_buffer_v6(struct s5p_mfc_ctx *ctx)
}
}
- mfc_debug(2, "Buf1: %u, buf_size1: %d (frames %d)\n",
+ mfc_debug(2, "Buf1: %zu, buf_size1: %d (frames %d)\n",
buf_addr1, buf_size1, ctx->total_dpb_count);
if (buf_size1 < 0) {
mfc_debug(2, "Not enough memory has been allocated.\n");
@@ -593,7 +593,7 @@ static int s5p_mfc_set_enc_ref_buffer_v6(struct s5p_mfc_ctx *ctx)
buf_addr1 += ctx->tmv_buffer_size >> 1;
buf_size1 -= ctx->tmv_buffer_size;
- mfc_debug(2, "Buf1: %u, buf_size1: %d (ref frames %d)\n",
+ mfc_debug(2, "Buf1: %zu, buf_size1: %d (ref frames %d)\n",
buf_addr1, buf_size1, ctx->pb_count);
if (buf_size1 < 0) {
mfc_debug(2, "Not enough memory has been allocated.\n");
@@ -1880,7 +1880,7 @@ static void s5p_mfc_write_info_v6(struct s5p_mfc_ctx *ctx, unsigned int data,
unsigned int ofs)
{
s5p_mfc_clock_on();
- writel(data, (volatile void __iomem *)ofs);
+ writel(data, (volatile void __iomem *)((unsigned long)ofs));
s5p_mfc_clock_off();
}
@@ -1890,7 +1890,7 @@ s5p_mfc_read_info_v6(struct s5p_mfc_ctx *ctx, unsigned int ofs)
int ret;
s5p_mfc_clock_on();
- ret = readl((volatile void __iomem *)ofs);
+ ret = readl((volatile void __iomem *)((unsigned long)ofs));
s5p_mfc_clock_off();
return ret;
@@ -2019,25 +2019,25 @@ static int s5p_mfc_get_mvc_view_id_v6(struct s5p_mfc_dev *dev)
static unsigned int s5p_mfc_get_pic_type_top_v6(struct s5p_mfc_ctx *ctx)
{
return s5p_mfc_read_info_v6(ctx,
- (__force unsigned int) ctx->dev->mfc_regs->d_ret_picture_tag_top);
+ (__force unsigned long) ctx->dev->mfc_regs->d_ret_picture_tag_top);
}
static unsigned int s5p_mfc_get_pic_type_bot_v6(struct s5p_mfc_ctx *ctx)
{
return s5p_mfc_read_info_v6(ctx,
- (__force unsigned int) ctx->dev->mfc_regs->d_ret_picture_tag_bot);
+ (__force unsigned long) ctx->dev->mfc_regs->d_ret_picture_tag_bot);
}
static unsigned int s5p_mfc_get_crop_info_h_v6(struct s5p_mfc_ctx *ctx)
{
return s5p_mfc_read_info_v6(ctx,
- (__force unsigned int) ctx->dev->mfc_regs->d_display_crop_info1);
+ (__force unsigned long) ctx->dev->mfc_regs->d_display_crop_info1);
}
static unsigned int s5p_mfc_get_crop_info_v_v6(struct s5p_mfc_ctx *ctx)
{
return s5p_mfc_read_info_v6(ctx,
- (__force unsigned int) ctx->dev->mfc_regs->d_display_crop_info2);
+ (__force unsigned long) ctx->dev->mfc_regs->d_display_crop_info2);
}
static struct s5p_mfc_regs mfc_regs;
--
1.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 15/18] [media] s5p_mfc_opr: Fix warnings
[not found] <c8634fac0c56cfaa9bdad29d541e95b17c049c0a.1411597610.git.mchehab@osg.samsung.com>
` (2 preceding siblings ...)
2014-09-24 22:27 ` [PATCH 14/18] [media] s5p_mfc_opr_v6: get rid of warnings when compiled with 64 bits Mauro Carvalho Chehab
@ 2014-09-24 22:27 ` Mauro Carvalho Chehab
2014-09-24 23:02 ` Fabio Estevam
2014-09-24 22:27 ` [PATCH 16/18] s5p-mfc: Fix several printk warnings Mauro Carvalho Chehab
4 siblings, 1 reply; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2014-09-24 22:27 UTC (permalink / raw)
To: linux-arm-kernel
CC drivers/media//platform/s5p-mfc/s5p_mfc_opr.o
drivers/media//platform/s5p-mfc/s5p_mfc_opr.c: In function ?s5p_mfc_alloc_priv_buf?:
drivers/media//platform/s5p-mfc/s5p_mfc_opr.c:44:2: warning: format ?%d? expects argument of type ?int?, but argument 4 has type ?size_t? [-Wformat=]
mfc_debug(3, "Allocating priv: %d\n", b->size);
^
drivers/media//platform/s5p-mfc/s5p_mfc_opr.c:53:2: warning: format ?%x? expects argument of type ?unsigned int?, but argument 5 has type ?dma_addr_t? [-Wformat=]
mfc_debug(3, "Allocated addr %p %08x\n", b->virt, b->dma);
^
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c b/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
index c9a227428e6a..5d311d6ba8f7 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
@@ -41,7 +41,7 @@ int s5p_mfc_alloc_priv_buf(struct device *dev,
struct s5p_mfc_priv_buf *b)
{
- mfc_debug(3, "Allocating priv: %d\n", b->size);
+ mfc_debug(3, "Allocating priv: %zd\n", b->size);
b->virt = dma_alloc_coherent(dev, b->size, &b->dma, GFP_KERNEL);
@@ -50,7 +50,7 @@ int s5p_mfc_alloc_priv_buf(struct device *dev,
return -ENOMEM;
}
- mfc_debug(3, "Allocated addr %p %08x\n", b->virt, b->dma);
+ mfc_debug(3, "Allocated addr %p %pad\n", b->virt, &b->dma);
return 0;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 16/18] s5p-mfc: Fix several printk warnings
[not found] <c8634fac0c56cfaa9bdad29d541e95b17c049c0a.1411597610.git.mchehab@osg.samsung.com>
` (3 preceding siblings ...)
2014-09-24 22:27 ` [PATCH 15/18] [media] s5p_mfc_opr: Fix warnings Mauro Carvalho Chehab
@ 2014-09-24 22:27 ` Mauro Carvalho Chehab
4 siblings, 0 replies; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2014-09-24 22:27 UTC (permalink / raw)
To: linux-arm-kernel
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>
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)
{
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);
}
}
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)
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);
}
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
index adffdb37746b..a2cc86dbe5db 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)
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: %zd\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");
--
1.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 15/18] [media] s5p_mfc_opr: Fix warnings
2014-09-24 22:27 ` [PATCH 15/18] [media] s5p_mfc_opr: Fix warnings Mauro Carvalho Chehab
@ 2014-09-24 23:02 ` Fabio Estevam
2014-09-24 23:25 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 8+ messages in thread
From: Fabio Estevam @ 2014-09-24 23:02 UTC (permalink / raw)
To: linux-arm-kernel
Hi Mauro,
On Wed, Sep 24, 2014 at 7:27 PM, Mauro Carvalho Chehab
<mchehab@osg.samsung.com> wrote:
> drivers/media//platform/s5p-mfc/s5p_mfc_opr.c:44:2: warning: format ?%d? expects argument of type ?int?, but argument 4 has type ?size_t? [-Wformat=]
...
> - mfc_debug(3, "Allocating priv: %d\n", b->size);
> + mfc_debug(3, "Allocating priv: %zd\n", b->size);
This should be %zu instead.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 13/18] [media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64
2014-09-24 22:27 ` [PATCH 13/18] [media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64 Mauro Carvalho Chehab
@ 2014-09-24 23:05 ` Fabio Estevam
0 siblings, 0 replies; 8+ messages in thread
From: Fabio Estevam @ 2014-09-24 23:05 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 24, 2014 at 7:27 PM, Mauro Carvalho Chehab
<mchehab@osg.samsung.com> wrote:
> - mfc_debug(2, "buf_size1: %d, buf_size2: %d\n", buf_size1, buf_size2);
> + mfc_debug(2, "buf_size1: %zd, buf_size2: %zd\n", buf_size1, buf_size2);
This should be %zu. Same for other %zd ocurrences.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 15/18] [media] s5p_mfc_opr: Fix warnings
2014-09-24 23:02 ` Fabio Estevam
@ 2014-09-24 23:25 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2014-09-24 23:25 UTC (permalink / raw)
To: linux-arm-kernel
Em Wed, 24 Sep 2014 20:02:19 -0300
Fabio Estevam <festevam@gmail.com> escreveu:
> Hi Mauro,
>
> On Wed, Sep 24, 2014 at 7:27 PM, Mauro Carvalho Chehab
> <mchehab@osg.samsung.com> wrote:
>
>
> > drivers/media//platform/s5p-mfc/s5p_mfc_opr.c:44:2: warning: format ?%d? expects argument of type ?int?, but argument 4 has type ?size_t? [-Wformat=]
>
> ...
>
> > - mfc_debug(3, "Allocating priv: %d\n", b->size);
> > + mfc_debug(3, "Allocating priv: %zd\n", b->size);
>
> This should be %zu instead.
Thanks! fixed on both patches.
Regards,
Mauro
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-09-24 23:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <c8634fac0c56cfaa9bdad29d541e95b17c049c0a.1411597610.git.mchehab@osg.samsung.com>
2014-09-24 22:27 ` [PATCH 02/18] [media] st_rc: fix address space casting Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 13/18] [media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64 Mauro Carvalho Chehab
2014-09-24 23:05 ` Fabio Estevam
2014-09-24 22:27 ` [PATCH 14/18] [media] s5p_mfc_opr_v6: get rid of warnings when compiled with 64 bits Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 15/18] [media] s5p_mfc_opr: Fix warnings Mauro Carvalho Chehab
2014-09-24 23:02 ` Fabio Estevam
2014-09-24 23:25 ` Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 16/18] s5p-mfc: Fix several printk warnings Mauro Carvalho Chehab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).