• Geert Uytterhoeven's avatar
    ASoC: SOF: mediatek: Use %pR/%pa to print resources/physical addresses · 4dcddadf
    Geert Uytterhoeven authored
    On 32-bit with CONFIG_ARCH_DMA_ADDR_T_64BIT=n:
    
        sound/soc/sof/mediatek/mt8195/mt8195.c: In function ‘platform_parse_resource’:
        sound/soc/sof/mediatek/mt8195/mt8195.c:51:15: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘unsigned int’ [-Werror=format=]
           51 |  dev_dbg(dev, "DMA pbase=0x%llx, size=0x%llx\n",
    	  |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
        sound/soc/sof/mediatek/mt8195/mt8195.c: In function ‘adsp_memory_remap_init’:
        sound/soc/sof/mediatek/mt8195/mt8195.c:167:15: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘phys_addr_t’ {aka ‘unsigned int’} [-Werror=format=]
          167 |  dev_dbg(dev, "adsp->pa_dram %llx, offset %#x\n", adsp->pa_dram, offset);
    	  |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
        sound/soc/sof/mediatek/mt8195/mt8195.c: In function ‘adsp_shared_base_ioremap’:
        sound/soc/sof/mediatek/mt8195/mt8195.c:196:15: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘phys_addr_t’ {aka ‘unsigned int’} [-Werror=format=]
          196 |  dev_dbg(dev, "shared-dram vbase=%p, phy addr :%llx,  size=%#x\n",
    	  |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Fix the first cases by printing the full resource using %pR.
    Fix the other cases by printing the physical addresses using %pa.
    
    Reported-by: noreply@ellerman.id.au
    Fixes: 32d7e03d
    
     ("ASoC: SOF: mediatek: Add mt8195 hardware support")
    Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
    Link: https://lore.kernel.org/r/20211123103013.73645-1-geert@linux-m68k.org
    
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    4dcddadf
mt8195.c 10.3 KB