From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 02AE02163B2; Mon, 16 Jun 2025 08:24:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750062270; cv=none; b=Tb9Gx9KVSAA7Ttcz40qGoVN/1TlMnMdff+k1HPaNq5JhWgp9HnE8ZRN+FdwkaFoC/vvr5Y+FMNW9PxNgIsTjVJr/rWuamGtmle+kGMHlQsZzP4iBbLWXNHq9/L/gphen0gBOnhUnWLsNZm/DRmbzxE25D2b9ZolCFL7lLkfs7F8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750062270; c=relaxed/simple; bh=2wunBQAEUUjaoDkXd/pxyrdC4UwepMLxk2ExQRIJD3Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uQW4z8EWtTGBZjvGfOgCxDABt9G2tmEarxwgHzcoJuUg99kP8f0hOhgjp27/j7BdoQ7qg+plNsJtxd5NUnwrBp7goKLDIJI1SfPmCoueh/0Ed93ZifjlnsEH/7yABiDyQ6rd/dtliVz5doUxxlHthxe1x5q8xxYblhhKR/PQUWI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jkscdBit; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jkscdBit" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAB09C4CEEA; Mon, 16 Jun 2025 08:24:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750062269; bh=2wunBQAEUUjaoDkXd/pxyrdC4UwepMLxk2ExQRIJD3Q=; h=From:To:Cc:Subject:Date:From; b=jkscdBit8Sid4gQDBvclhlpmB3PXZY2xMH3LQjEvjoyiaGbaaCe6UlYmqIjHpAt00 0KuPBjGNYh/jjuc3G88+khp530fPj5tS4wlSlQSsDueXpAKEtBqyEa279mjJKZQnfT NYjNvrdcYasr+DXT205vDoTd+scc7MGjxEAf+qtu73Cd0jOZBnfJTPRrfvNo011oik r68NLLC8PGiqyfRwqZwl4fYGah7QrBSe9Z6uuWAL7/nwLB0F521bNgOaofK18tXV4a qnt8BnhEH8wGfUqFsoQoj41IqP8/bFIGyUxFFcRvQJbAu3bp+Bph2oyXOBQv4E4sEk Amn26tXd++ySw== From: Leon Romanovsky To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski Cc: Mark Zhang , linux-rdma@vger.kernel.org, netdev@vger.kernel.org, Paolo Abeni , Patrisious Haddad , Tariq Toukan , Jason Gunthorpe Subject: [PATCH net] net/mlx4e: Remove redundant definition of IB_MTU_XXX Date: Mon, 16 Jun 2025 11:24:23 +0300 Message-ID: X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Mark Zhang Remove them to avoid "redeclaration of enumerator" build error, as they are already defined in ib_verbs.h. This is needed for the following patch, which need to include the ib_verbs.h. Fixes: 096335b3f983 ("mlx4_core: Allow dynamic MTU configuration for IB ports") Reviewed-by: Patrisious Haddad Signed-off-by: Mark Zhang Signed-off-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx4/main.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index febeadfdd5a5..03d2fc7d9b09 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -49,6 +49,8 @@ #include #include +#include + #include "mlx4.h" #include "fw.h" #include "icm.h" @@ -1246,14 +1248,6 @@ static ssize_t set_port_type(struct device *dev, return err ? err : count; } -enum ibta_mtu { - IB_MTU_256 = 1, - IB_MTU_512 = 2, - IB_MTU_1024 = 3, - IB_MTU_2048 = 4, - IB_MTU_4096 = 5 -}; - static inline int int_to_ibta_mtu(int mtu) { switch (mtu) { @@ -1266,7 +1260,7 @@ static inline int int_to_ibta_mtu(int mtu) } } -static inline int ibta_mtu_to_int(enum ibta_mtu mtu) +static inline int ibta_mtu_to_int(enum ib_mtu mtu) { switch (mtu) { case IB_MTU_256: return 256; -- 2.49.0