linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sata: fsl: fix DPRINTK format string
Date: Mon, 17 May 2021 09:12:50 -0600	[thread overview]
Message-ID: <309095e5-6b12-6517-2370-737aae33f012@kernel.dk> (raw)
In-Reply-To: <20210514213402.691436-1-arnd@kernel.org>

On 5/14/21 3:33 PM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Printing an __iomem pointer as %x produces a warning:
> 
> drivers/ata/sata_fsl.c: In function 'fsl_sata_set_irq_coalescing':
> drivers/ata/sata_fsl.c:316:17: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'void *' [-Werror=format=]
>   316 |         DPRINTK("ICC register status: (hcr base: 0x%x) = 0x%x\n",
>       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   317 |                         hcr_base, ioread32(hcr_base + ICC));
>       |                         ~~~~~~~~
>       |                         |
>       |                         void *
> 
> It's not clear why that pointer should be printed here, but if we do,
> then using %p is the way to avoid the warnings.

Applied, thanks.

-- 
Jens Axboe


      reply	other threads:[~2021-05-17 16:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14 21:33 [PATCH] sata: fsl: fix DPRINTK format string Arnd Bergmann
2021-05-17 15:12 ` Jens Axboe [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=309095e5-6b12-6517-2370-737aae33f012@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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).