All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kernel-janitors@vger.kernel.org, Mike Dunn <mikedunn@newsguy.com>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-mtd@lists.infradead.org
Subject: Re: [patch] mtd: nand: fix printk() warnings
Date: Tue, 31 Jan 2012 17:45:30 +0000	[thread overview]
Message-ID: <4F28359A.3010200@xenotime.net> (raw)
In-Reply-To: <20120131085405.GD22039@elgon.mountain>

On 01/31/2012 12:54 AM, Dan Carpenter wrote:
> Gcc complains here:
> drivers/mtd/nand/docg4.c: In function ‘probe_docg4’:
> drivers/mtd/nand/docg4.c:1277:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘resource_size_t’ [-Wformat]
> drivers/mtd/nand/docg4.c:1277:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘resource_size_t’ [-Wformat]
> 
> We have a standard way of printing these using a format string
> extension.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Yes, this is preferable over my patch yesterday.
Thanks.

Acked-by: Randy Dunlap <rdunlap@xenotime.net>

> 
> diff --git a/drivers/mtd/nand/docg4.c b/drivers/mtd/nand/docg4.c
> index 3ec1d10..8a0d7f6 100644
> --- a/drivers/mtd/nand/docg4.c
> +++ b/drivers/mtd/nand/docg4.c
> @@ -1272,9 +1272,7 @@ static int __init probe_docg4(struct platform_device *pdev)
>  
>  	virtadr = ioremap(r->start, resource_size(r));
>  	if (!virtadr) {
> -		dev_err(dev, "Diskonchip ioremap failed: "
> -			"0x%x bytes at 0x%x\n",
> -			resource_size(r), r->start);
> +		dev_err(dev, "Diskonchip ioremap failed: %pR\n", r);
>  		return -EIO;
>  	}
>  
> --


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

WARNING: multiple messages have this Message-ID (diff)
From: Randy Dunlap <rdunlap@xenotime.net>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kernel-janitors@vger.kernel.org, Mike Dunn <mikedunn@newsguy.com>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-mtd@lists.infradead.org
Subject: Re: [patch] mtd: nand: fix printk() warnings
Date: Tue, 31 Jan 2012 10:40:26 -0800	[thread overview]
Message-ID: <4F28359A.3010200@xenotime.net> (raw)
In-Reply-To: <20120131085405.GD22039@elgon.mountain>

On 01/31/2012 12:54 AM, Dan Carpenter wrote:
> Gcc complains here:
> drivers/mtd/nand/docg4.c: In function ‘probe_docg4’:
> drivers/mtd/nand/docg4.c:1277:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘resource_size_t’ [-Wformat]
> drivers/mtd/nand/docg4.c:1277:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘resource_size_t’ [-Wformat]
> 
> We have a standard way of printing these using a format string
> extension.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Yes, this is preferable over my patch yesterday.
Thanks.

Acked-by: Randy Dunlap <rdunlap@xenotime.net>

> 
> diff --git a/drivers/mtd/nand/docg4.c b/drivers/mtd/nand/docg4.c
> index 3ec1d10..8a0d7f6 100644
> --- a/drivers/mtd/nand/docg4.c
> +++ b/drivers/mtd/nand/docg4.c
> @@ -1272,9 +1272,7 @@ static int __init probe_docg4(struct platform_device *pdev)
>  
>  	virtadr = ioremap(r->start, resource_size(r));
>  	if (!virtadr) {
> -		dev_err(dev, "Diskonchip ioremap failed: "
> -			"0x%x bytes at 0x%x\n",
> -			resource_size(r), r->start);
> +		dev_err(dev, "Diskonchip ioremap failed: %pR\n", r);
>  		return -EIO;
>  	}
>  
> --


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

  reply	other threads:[~2012-01-31 17:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-31  8:54 [patch] mtd: nand: fix printk() warnings Dan Carpenter
2012-01-31  8:54 ` Dan Carpenter
2012-01-31 17:45 ` Randy Dunlap [this message]
2012-01-31 18:40   ` Randy Dunlap
2012-02-03  9:16 ` Artem Bityutskiy
2012-02-03  9:16   ` Artem Bityutskiy

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=4F28359A.3010200@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=dan.carpenter@oracle.com \
    --cc=dwmw2@infradead.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mikedunn@newsguy.com \
    --cc=robert.jarzmik@free.fr \
    /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.