From: Moni Shoua Date: Tue, 3 Feb 2015 14:48:36 +0000 (+0200) Subject: IB/mlx4: Reuse mlx4_mac_to_u64() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2f48485d1cea5b6c1ce04969ab0228aa7b4659e5;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git IB/mlx4: Reuse mlx4_mac_to_u64() This function is implemented twice... get rid of one copy. Signed-off-by: Moni Shoua Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller --- 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 #include +#include #include #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),