summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNetanel Belgazal <netanel@amazon.com>2017-06-23 11:21:58 +0300
committerDavid S. Miller <davem@davemloft.net>2017-06-23 14:15:10 -0400
commit3ae5907c61587ed8327484bfdda87de0257ea73f (patch)
tree562b5ba656eaedd1b356e72aba1fa7986ec9f2be
parent4265114d5391ed92d7860472c7c8dfe866707106 (diff)
net: ena: use lower_32_bits()/upper_32_bits() to split dma address
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>
-rw-r--r--drivers/net/ethernet/amazon/ena/ena_com.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c b/drivers/net/ethernet/amazon/ena/ena_com.c
index f6e1d30523a6..52beba8c7a39 100644
--- a/drivers/net/ethernet/amazon/ena/ena_com.c
+++ b/drivers/net/ethernet/amazon/ena/ena_com.c
@@ -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;
}