dma-mapping: fix m32r build warning
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Thu, 29 Sep 2016 10:02:40 +0000 (12:02 +0200)
committerVinod Koul <vinod.koul@intel.com>
Thu, 29 Sep 2016 12:08:02 +0000 (17:38 +0530)
commit3757dc48a66f829cf6ba82a612ba4587ab4b5f1c
tree93df50c33ed349e5468a00c0cd26adb2b41549df
parent2895e1f8048d1be7b1b5be6439c740621c0e5361
dma-mapping: fix m32r build warning

kbuild test robot reports:

   In file included from include/linux/skbuff.h:34:0,
                    from include/linux/icmpv6.h:4,
                    from include/linux/ipv6.h:75,
                    from include/net/ipv6.h:16,
                    from include/linux/sunrpc/clnt.h:27,
                    from include/linux/nfs_fs.h:30,
                    from fs/lockd/clntlock.c:13:
   include/linux/dma-mapping.h: In function 'dma_map_resource':
>> include/linux/dma-mapping.h:274:16: warning: unused variable 'pfn' [-Wunused-variable]
     unsigned long pfn = __phys_to_pfn(phys_addr);
                   ^~~

The pfn value is only used once in the call to pfn_valid(), remove the
variable and calculate the pfn when it's needed. Note that the kbuild
report is old and PHYS_PFN() is now used instead of __phys_to_pfn() to
calculate the pfn.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
include/linux/dma-mapping.h