Commit 3ae5907c authored by Netanel Belgazal's avatar Netanel Belgazal Committed by David S. Miller

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: default avatarNetanel Belgazal <netanel@amazon.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4265114d
...@@ -99,8 +99,8 @@ static inline int ena_com_mem_addr_set(struct ena_com_dev *ena_dev, ...@@ -99,8 +99,8 @@ static inline int ena_com_mem_addr_set(struct ena_com_dev *ena_dev,
return -EINVAL; return -EINVAL;
} }
ena_addr->mem_addr_low = (u32)addr; ena_addr->mem_addr_low = lower_32_bits(addr);
ena_addr->mem_addr_high = (u64)addr >> 32; ena_addr->mem_addr_high = (u16)upper_32_bits(addr);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment