diff mbox

[15/18,media] s5p_mfc_opr: Fix warnings

Message ID ed21f64844bd63573466c2667fd035f9e650a5f9.1411597610.git.mchehab@osg.samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mauro Carvalho Chehab Sept. 24, 2014, 10:27 p.m. UTC
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>

Comments

Fabio Estevam Sept. 24, 2014, 11:02 p.m. UTC | #1
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.
Mauro Carvalho Chehab Sept. 24, 2014, 11:25 p.m. UTC | #2
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
diff mbox

Patch

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;
 }