dma-debug: fix ia64 build, use PHYS_PFN
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Thu, 29 Sep 2016 19:59:15 +0000 (21:59 +0200)
committerVinod Koul <vinod.koul@intel.com>
Fri, 30 Sep 2016 17:51:05 +0000 (23:21 +0530)
kbuild test robot reports:

   lib/dma-debug.c: In function 'debug_dma_map_resource':
>> lib/dma-debug.c:1541:16: error: implicit declaration of function '__phys_to_pfn' [-Werror=implicit-function-declaration]
     entry->pfn  = __phys_to_pfn(addr);
                   ^~~~~~~~~~~~~

ia64 does not provide __phys_to_pfn(), use the PHYS_PFN() alias.

Fixes: 0e74b34dfc3318bf ("dma-debug: add support for resource mappings")
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
lib/dma-debug.c

index 2ba086b0d3e73fd66fba555ef1d00a59348d7694..59e75863bfa0cb72542f0a497e254dab082be690 100644 (file)
@@ -1514,7 +1514,7 @@ void debug_dma_map_resource(struct device *dev, phys_addr_t addr, size_t size,
 
        entry->type             = dma_debug_resource;
        entry->dev              = dev;
-       entry->pfn              = __phys_to_pfn(addr);
+       entry->pfn              = PHYS_PFN(addr);
        entry->offset           = offset_in_page(addr);
        entry->size             = size;
        entry->dev_addr         = dma_addr;