diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-04 12:14:43 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-05 13:15:35 +0100 |
commit | ded6e16b37e4c8c86cda98604ecd78818d6ca36a (patch) | |
tree | 987f129ad99137866497ebe6b1427bab56d69a55 /include | |
parent | 549017aa1bb7ec19a1e24e7f65480a1c2e76b90e (diff) | |
download | linux-stable-ded6e16b37e4c8c86cda98604ecd78818d6ca36a.tar.gz linux-stable-ded6e16b37e4c8c86cda98604ecd78818d6ca36a.tar.bz2 linux-stable-ded6e16b37e4c8c86cda98604ecd78818d6ca36a.zip |
mlx4: replace mlx4_mac_to_u64() with ether_addr_to_u64()
mlx4_mac_to_u64() predates and opencodes ether_addr_to_u64().
It doesn't make the argument constant so it'll be problematic
when dev->dev_addr becomes a const. Convert to the generic helper.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mlx4/driver.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h index a858bcb6220b..b26b71f62fb4 100644 --- a/include/linux/mlx4/driver.h +++ b/include/linux/mlx4/driver.h @@ -92,18 +92,6 @@ void *mlx4_get_protocol_dev(struct mlx4_dev *dev, enum mlx4_protocol proto, int struct devlink_port *mlx4_get_devlink_port(struct mlx4_dev *dev, int port); -static inline u64 mlx4_mac_to_u64(u8 *addr) -{ - u64 mac = 0; - int i; - - for (i = 0; i < ETH_ALEN; i++) { - mac <<= 8; - mac |= addr[i]; - } - return mac; -} - static inline void mlx4_u64_to_mac(u8 *addr, u64 mac) { int i; |