• Arnd Bergmann's avatar
    soc: TI knav_qmss: fix dma_addr_t printing · cc0336ec
    Arnd Bergmann authored
    The knav_qmss driver is currently broken when CONFIG_LPAE is
    set, which is a bit surprising because I'd expect that any serious
    users of this platforms would have more than 2GB of RAM and require
    LPAE.
    
    The compiler clearly warns about an incorrect use of dma_addr_t
    in the debug kernel messages:
    
    ti/knav_qmss_queue.c: In function 'knav_queue_setup_region':
    ti/knav_qmss_queue.c:1025:117: warning: format '%x' expects argument of type 'unsigned int', but argument 9 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=]
    ti/knav_qmss_queue.c:1025:117: warning: format '%x' expects argument of type 'unsigned int', but argument 10 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=]
    ti/knav_qmss_queue.c: In function 'knav_queue_setup_link_ram':
    ti/knav_qmss_queue.c:1175:118: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=]
    
    This patch changes all the debugging output to use the correct
    %pad format string that works with both 32-bit and 64-bit dma_addr_t.
    As the variable naming is somewhat confusing here, I also change
    all *_phys names to *_dma when they refer to bus addresses that
    are used for DMA rather than a physical memory address as seen from
    the CPU. This is particularly important on keystone, because the
    two things are not the same there.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    cc0336ec
knav_qmss_acc.c 16 KB