From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22F55C43332 for ; Thu, 11 Mar 2021 22:38:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E697264F9A for ; Thu, 11 Mar 2021 22:38:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231229AbhCKWhx (ORCPT ); Thu, 11 Mar 2021 17:37:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:33502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229803AbhCKWhi (ORCPT ); Thu, 11 Mar 2021 17:37:38 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 916FF64F26; Thu, 11 Mar 2021 22:37:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615502258; bh=ylhIgTxDxvkxmHKvCFK4z0+i+ivTtNz4xQnZLqpnQvg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KxrfpHBAhUVIjfnlaTWV0mGS2AsuwFsfJ0HzpQ32C3vCj6MJV5JbV4K+e59WSbiKG 4ANkfQKoWe8jPXqVvrKvvY06N4cwIGA4FiEnEuXlP+gEuT79aH4Qd6PJkUOiaRwa7Z spY8KFegMwevRJFwvGrEK8vLm6Xab+n8oYhVPpqs+YpX+IJt3N6W8ia6prNgE0F6/W xgL+6zgloIwTy6uL9FeYf0gUQyD8hA5l9vMq/g9FAwKy/jbt9u4XdVUrczdbwcQ9pD OOhiDGInrrsnRf1P5eZf+1tlvJ7yLlgWlHNxaOHzFPstpyEYJ2opPhnXSH3tb22udH yU11NWeAmzuRQ== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, Arnd Bergmann , Vlad Buslov , Saeed Mahameed Subject: [net-next 08/15] net/mlx5e: fix mlx5e_tc_tun_update_header_ipv6 dummy definition Date: Thu, 11 Mar 2021 14:37:16 -0800 Message-Id: <20210311223723.361301-9-saeed@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210311223723.361301-1-saeed@kernel.org> References: <20210311223723.361301-1-saeed@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann The alternative implementation of this function in a header file is declared as a global symbol, and gets added to every .c file that includes it, which leads to a link error: arm-linux-gnueabi-ld: drivers/net/ethernet/mellanox/mlx5/core/en_rx.o: in function `mlx5e_tc_tun_update_header_ipv6': en_rx.c:(.text+0x0): multiple definition of `mlx5e_tc_tun_update_header_ipv6'; drivers/net/ethernet/mellanox/mlx5/core/en_main.o:en_main.c:(.text+0x0): first defined here Mark it 'static inline' like the other functions here. Signed-off-by: Arnd Bergmann Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h index 67de2bf36861..89d5ca91566e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h @@ -76,10 +76,12 @@ int mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv, static inline int mlx5e_tc_tun_create_header_ipv6(struct mlx5e_priv *priv, struct net_device *mirred_dev, - struct mlx5e_encap_entry *e) { return -EOPNOTSUPP; } -int mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv, - struct net_device *mirred_dev, - struct mlx5e_encap_entry *e) + struct mlx5e_encap_entry *e) +{ return -EOPNOTSUPP; } +static inline int +mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv, + struct net_device *mirred_dev, + struct mlx5e_encap_entry *e) { return -EOPNOTSUPP; } #endif int mlx5e_tc_tun_route_lookup(struct mlx5e_priv *priv, -- 2.29.2