public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Arnd Bergmann <arnd@kernel.org>, Tejun Heo <tj@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sata: nv: fix debug format string mismatch
Date: Mon, 17 May 2021 09:13:30 -0600	[thread overview]
Message-ID: <f76e73e5-841e-fe3d-1e84-a259eff2e009@kernel.dk> (raw)
In-Reply-To: <20210514140105.3080580-1-arnd@kernel.org>

On 5/14/21 8:01 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Turning on debugging in this this driver reveals a type mismatch:
> 
> In file included from include/linux/kernel.h:17,
>                  from drivers/ata/sata_nv.c:23:
> drivers/ata/sata_nv.c: In function 'nv_swncq_sdbfis':
> drivers/ata/sata_nv.c:2121:10: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'u64' {aka 'long long unsigned int'} [-Werror=format=]
>  2121 |  DPRINTK("id 0x%x QC: qc_active 0x%x,"
>       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ......
>  2124 |   ap->print_id, ap->qc_active, pp->qc_active,
>       |                 ~~~~~~~~~~~~~
>       |                   |
>       |                   u64 {aka long long unsigned int}
> include/linux/printk.h:142:10: note: in definition of macro 'no_printk'
>   142 |   printk(fmt, ##__VA_ARGS__);  \
>       |          ^~~
> drivers/ata/sata_nv.c:2121:2: note: in expansion of macro 'DPRINTK'
>  2121 |  DPRINTK("id 0x%x QC: qc_active 0x%x,"
>       |  ^~~~~~~
> drivers/ata/sata_nv.c:2121:36: note: format string is defined here
>  2121 |  DPRINTK("id 0x%x QC: qc_active 0x%x,"
>       |                                   ~^
>       |                                    |
>       |                                    unsigned int
>       |                                   %llx
> 
> Use the correct format string for the u64 type.

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 14:01 [PATCH] sata: nv: fix debug format string mismatch Arnd Bergmann
2021-05-17 15:13 ` 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=f76e73e5-841e-fe3d-1e84-a259eff2e009@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 \
    --cc=s.hauer@pengutronix.de \
    --cc=tj@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