All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: Re: [PATCH 17/21] media: ispstat: use %p to print the address of a buffer
Date: Fri, 6 Apr 2018 13:24:32 -0300	[thread overview]
Message-ID: <20180406132432.7edd426a@vento.lan> (raw)
In-Reply-To: <2465013.GQB41gvM8H@avalon>

Em Fri, 06 Apr 2018 18:46:05 +0300
Laurent Pinchart <laurent.pinchart@ideasonboard.com> escreveu:

> Hi Mauro,
> 
> Thank you for the patch.
> 
> On Friday, 6 April 2018 17:23:18 EEST Mauro Carvalho Chehab wrote:
> > Instead of converting to int, use %p. That prevents this
> > warning:
> > 	drivers/media/platform/omap3isp/ispstat.c:451 isp_stat_bufs_alloc() warn:
> > argument 7 to %08lx specifier is cast from pointer
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> > ---
> >  drivers/media/platform/omap3isp/ispstat.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/media/platform/omap3isp/ispstat.c
> > b/drivers/media/platform/omap3isp/ispstat.c index
> > 47cbc7e3d825..eb1b589b0aeb 100644
> > --- a/drivers/media/platform/omap3isp/ispstat.c
> > +++ b/drivers/media/platform/omap3isp/ispstat.c
> > @@ -449,10 +449,10 @@ static int isp_stat_bufs_alloc(struct ispstat *stat,
> > u32 size) buf->empty = 1;
> > 
> >  		dev_dbg(stat->isp->dev,
> > -			"%s: buffer[%u] allocated. dma=0x%08lx virt=0x%08lx",
> > +			"%s: buffer[%u] allocated. dma=0x%08lx virt=%p",
> >  			stat->subdev.name, i,
> >  			(unsigned long)buf->dma_addr,
> > -			(unsigned long)buf->virt_addr);
> > +			buf->virt_addr);  
> 
> While at it you can use %pad for buf->dma_addr.
> 
> 		dev_dbg(stat->isp->dev,
> 			"%s: buffer[%u] allocated. dma=%pad virt=%p",
> 			stat->subdev.name, i, &buf->dma_addr, buf->virt_addr);
> 
> With that change,
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> >  	}
> > 
> >  	return 0;  
> 

OK. New patch enclosed.

Thanks,
Mauro

[PATCH] media: ispstat: use %p to print the address of a buffer

Instead of converting to int, use %p. That prevents this
warning:
	drivers/media/platform/omap3isp/ispstat.c:451 isp_stat_bufs_alloc() warn: argument 7 to %08lx specifier is cast from pointer

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

diff --git a/drivers/media/platform/omap3isp/ispstat.c b/drivers/media/platform/omap3isp/ispstat.c
index 47cbc7e3d825..0b31f6c5791f 100644
--- a/drivers/media/platform/omap3isp/ispstat.c
+++ b/drivers/media/platform/omap3isp/ispstat.c
@@ -449,10 +449,8 @@ static int isp_stat_bufs_alloc(struct ispstat *stat, u32 size)
 		buf->empty = 1;
 
 		dev_dbg(stat->isp->dev,
-			"%s: buffer[%u] allocated. dma=0x%08lx virt=0x%08lx",
-			stat->subdev.name, i,
-			(unsigned long)buf->dma_addr,
-			(unsigned long)buf->virt_addr);
+			"%s: buffer[%u] allocated. dma=%pad virt=%p",
+			stat->subdev.name, i, &buf->dma_addr, buf->virt_addr);
 	}
 
 	return 0;

  reply	other threads:[~2018-04-06 16:24 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-06 14:23 [PATCH 00/21] Fix sparse/smatch errors on non-x86 drivers Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 01/21] media: davinci_vpfe: remove useless checks from ipipe Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 02/21] media: dm365_ipipe: remove an unused var Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 03/21] media: davinci_vpfe: fix vpfe_ipipe_init() error handling Mauro Carvalho Chehab
2018-10-09  4:46   ` Joel Fernandes
2018-10-11 16:56     ` Joel Fernandes
2018-04-06 14:23 ` [PATCH 04/21] media: davinci_vpfe: mark __iomem as such Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 05/21] media: davinci_vpfe: get rid of an unused var at dm365_isif.c Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 06/21] media: davinci_vpfe: vpfe_video: remove an unused var Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 07/21] media: davinci_vpfe: don't use kernel-doc markup for simple comments Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 08/21] media: davinci_vpfe: fix a typo for "default" Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 09/21] media: davinci_vpfe: cleanup ipipe_[g|s]_config logic Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 10/21] media: davinci_vpfe: fix __user annotations Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 11/21] media: si470x: fix __be16 annotations Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 12/21] media: isif: reorder a statement to match coding style Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 13/21] media: davinci: fix an inconsistent ident Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 14/21] media: mmp-driver: add needed __iomem marks to power_regs Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 15/21] media: vpbe_display: properly handle error case Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 16/21] media: vpbe_display: get rid of warnings Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 17/21] media: ispstat: use %p to print the address of a buffer Mauro Carvalho Chehab
2018-04-06 15:46   ` Laurent Pinchart
2018-04-06 16:24     ` Mauro Carvalho Chehab [this message]
2018-04-06 14:23 ` [PATCH 18/21] media: isppreview: fix __user annotations Mauro Carvalho Chehab
2018-04-06 15:54   ` Laurent Pinchart
2018-04-06 16:22     ` Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 19/21] media: fsl-viu: use %p to print pointers Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 20/21] media: fsl-viu: fix __iomem annotations Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 21/21] media: omap_vout: fix wrong identing Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180406132432.7edd426a@vento.lan \
    --to=mchehab@s-opensource.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.