net: ena: use lower_32_bits()/upper_32_bits() to split dma address
authorNetanel Belgazal <netanel@amazon.com>
Fri, 23 Jun 2017 08:21:58 +0000 (11:21 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Jun 2017 18:15:10 +0000 (14:15 -0400)
In ena_com_mem_addr_set(), use the above functions to split dma address
to the lower 32 bits and the higher 16 bits.

Signed-off-by: Netanel Belgazal <netanel@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_com.c

index f6e1d30523a64efec2e1147aaced56374466339f..52beba8c7a39990d3a9d6fb5910c689905a3a6a9 100644 (file)
@@ -99,8 +99,8 @@ static inline int ena_com_mem_addr_set(struct ena_com_dev *ena_dev,
                return -EINVAL;
        }
 
-       ena_addr->mem_addr_low = (u32)addr;
-       ena_addr->mem_addr_high = (u64)addr >> 32;
+       ena_addr->mem_addr_low = lower_32_bits(addr);
+       ena_addr->mem_addr_high = (u16)upper_32_bits(addr);
 
        return 0;
 }