linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@armlinux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: dma-mapping: Use %zu for printing a size_t variable
Date: Mon, 18 Jul 2016 17:11:42 +0100	[thread overview]
Message-ID: <20160718161142.GI1041@n2100.armlinux.org.uk> (raw)
In-Reply-To: <7fe0460e-3455-cb37-c961-ca44841abdcb@gmail.com>

On Mon, Jul 18, 2016 at 06:03:05PM +0200, Matthias Brugger wrote:
> 
> 
> On 07/17/2016 02:10 AM, Fabio Estevam wrote:
> >-	pr_err("DMA: failed to allocate %zx KiB pool for atomic coherent allocation\n",
> >+	pr_err("DMA: failed to allocate %zu KiB pool for atomic coherent allocation\n",
> 
> size_t should be formated as %zu or %zx so %zx is fine here.

However, when it prints:

DMA: failed to allocate 100 KiB pool for atomic coherent allocation

how are you going to interpret it if you don't know the format string?

This change is exactly the right thing to do here.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

      parent reply	other threads:[~2016-07-18 16:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-17  0:10 [PATCH] ARM: dma-mapping: Use %zu for printing a size_t variable Fabio Estevam
2016-07-18 16:03 ` Matthias Brugger
2016-07-18 16:11   ` Fabio Estevam
2016-07-18 16:23     ` Matthias Brugger
2016-07-18 16:11   ` Russell King - ARM Linux [this message]

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=20160718161142.GI1041@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=linux-arm-kernel@lists.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 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).