summaryrefslogtreecommitdiffstats
path: root/include/linux/mlx4
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-04 12:14:43 -0700
committerDavid S. Miller <davem@davemloft.net>2021-10-05 13:15:35 +0100
commitded6e16b37e4c8c86cda98604ecd78818d6ca36a (patch)
tree987f129ad99137866497ebe6b1427bab56d69a55 /include/linux/mlx4
parent549017aa1bb7ec19a1e24e7f65480a1c2e76b90e (diff)
downloadlinux-ded6e16b37e4c8c86cda98604ecd78818d6ca36a.tar.bz2
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/linux/mlx4')
-rw-r--r--include/linux/mlx4/driver.h12
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;