diff options
author | Moni Shoua <monis@mellanox.com> | 2015-02-03 17:48:36 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-05 03:14:25 +0300 |
commit | 2f48485d1cea5b6c1ce04969ab0228aa7b4659e5 (patch) | |
tree | aedec2500b30d8e45fe26e58dd7ebf45d922d0b7 /drivers/infiniband/hw/mlx4/qp.c | |
parent | 5da0354726e4a6ae2e25c1fa2feb77585d997b05 (diff) | |
download | linux-2f48485d1cea5b6c1ce04969ab0228aa7b4659e5.tar.xz |
IB/mlx4: Reuse mlx4_mac_to_u64()
This function is implemented twice... get rid of one copy.
Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband/hw/mlx4/qp.c')
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index cf000b7ad64f..2f85fc762865 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -40,6 +40,7 @@ #include <rdma/ib_addr.h> #include <rdma/ib_mad.h> +#include <linux/mlx4/driver.h> #include <linux/mlx4/qp.h> #include "mlx4_ib.h" @@ -93,17 +94,6 @@ enum { #ifndef ETH_ALEN #define ETH_ALEN 6 #endif -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 const __be32 mlx4_ib_opcode[] = { [IB_WR_SEND] = cpu_to_be32(MLX4_OPCODE_SEND), |