Skip to content

Commit b31507d

Browse files
geertuChristoph Hellwig
authored andcommitted
dma-debug: Use %pa to format phys_addr_t
On 32-bit without LPAE: kernel/dma/debug.c: In function ‘debug_dma_dump_mappings’: kernel/dma/debug.c:537:7: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 9 has type ‘phys_addr_t’ {aka ‘unsigned int’} [-Wformat=] kernel/dma/debug.c: In function ‘dump_show’: kernel/dma/debug.c:568:59: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 11 has type ‘phys_addr_t’ {aka ‘unsigned int’} [-Wformat=] Fixes: bd89d69 ("dma-debug: add cacheline to user/kernel space dump messages") Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/202303160548.ReyuTsGD-lkp@intel.com Reported-by: noreply@ellerman.id.au Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Christoph Hellwig <hch@lst.de>
1 parent bd89d69 commit b31507d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

kernel/dma/debug.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -534,11 +534,11 @@ void debug_dma_dump_mappings(struct device *dev)
534534
if (!dev || dev == entry->dev) {
535535
cln = to_cacheline_number(entry);
536536
dev_info(entry->dev,
537-
"%s idx %d P=%llx N=%lx D=%llx L=%llx cln=%llx %s %s\n",
537+
"%s idx %d P=%llx N=%lx D=%llx L=%llx cln=%pa %s %s\n",
538538
type2name[entry->type], idx,
539539
phys_addr(entry), entry->pfn,
540540
entry->dev_addr, entry->size,
541-
cln, dir2name[entry->direction],
541+
&cln, dir2name[entry->direction],
542542
maperr2str[entry->map_err_type]);
543543
}
544544
}
@@ -565,13 +565,13 @@ static int dump_show(struct seq_file *seq, void *v)
565565
list_for_each_entry(entry, &bucket->list, list) {
566566
cln = to_cacheline_number(entry);
567567
seq_printf(seq,
568-
"%s %s %s idx %d P=%llx N=%lx D=%llx L=%llx cln=%llx %s %s\n",
568+
"%s %s %s idx %d P=%llx N=%lx D=%llx L=%llx cln=%pa %s %s\n",
569569
dev_driver_string(entry->dev),
570570
dev_name(entry->dev),
571571
type2name[entry->type], idx,
572572
phys_addr(entry), entry->pfn,
573573
entry->dev_addr, entry->size,
574-
cln, dir2name[entry->direction],
574+
&cln, dir2name[entry->direction],
575575
maperr2str[entry->map_err_type]);
576576
}
577577
spin_unlock_irqrestore(&bucket->lock, flags);

0 commit comments

Comments
 (0)