sata: nv: fix debug format string mismatch
authorArnd Bergmann <arnd@arndb.de>
Fri, 14 May 2021 14:01:01 +0000 (16:01 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 17 May 2021 15:13:08 +0000 (09:13 -0600)
commit14fe1e858ca21cf3298b818cc27cb610dc7dac3e
tree1d34856ae8b3c6009b4adfaf95c3a75304a35e26
parentc9efa49290ce3aa8692054b5110f8123819d4874
sata: nv: fix debug format string mismatch

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.

Fixes: e3ed89396441 ("libata: bump ->qc_active to a 64-bit type")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210514140105.3080580-1-arnd@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/ata/sata_nv.c