From patchwork Thu Feb 25 12:54:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 387210 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp289742jap; Thu, 25 Feb 2021 04:57:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyjVQ+W0Pjg7dsNsskZLB88R6s+k/Hyf4PrW55wDFbdTpAwv0bJZX1J8ZIgibHGujEZ1MXZ X-Received: by 2002:a50:9dcd:: with SMTP id l13mr2755641edk.220.1614257829761; Thu, 25 Feb 2021 04:57:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614257829; cv=none; d=google.com; s=arc-20160816; b=gjleAJEqEdt+g213+6vL+SLpNXiyqYM8LPyP43VqJPkHy4228glYoKXKHrByfjsBlJ GbJmryclRHSDcqAt8MkQSXVAf0zK+9XYHZIYFx6wffgTagkZkud360twypkiRBBKcZAK fOZpCDSIxnbcAkhbmI+WvbDhyvxFVkjzZUYXRBb7DU++ZOSA6PVqn0dVYwn7a/S5i7Is h/bN9UikRAY08OWlCHiQsG6zPvoTRHLJmAMaoP5rObU7VealPuKwTdYHTIgVwEHumBrl IMmD6EJB7Gyzdoq6Lo80yULdjn4+6rHbQF9ajxK0C3JuVCyLGPbsPmw0LSwYmlQgTNXZ uWMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=VM2QBTyJGFvSI4jau0GTNlO3fh2lX4Q7hAb6xcJZgf0=; b=APlB5jkuIR/eXOKb54etm8tUHDpz521//4QmCO+QKEf9BkVW8SuFwPQamhdS0kSkcO s23NCUMFCPghLGpfXycDa1rYMA20TC88nGkFbjvqr6XkQqh0wZMjaP4VOMkrfQujqtKY kP0LcUTxMvgsyKC40tUGjcy+ukghuZFB/jxeWiDI9BrwXQdZBFrnV7GWV/A3/GT08ULf /pDqwbIuZWrOAml5Lx7Lm1Pf60wOEWsq/LpEYL4CwvL9pFI22Vl5tF21cSJ3SZT2e+7K +VtHKgpem62cyDi6BVO3uvhTbjARADDhbc3GmqI2Elvn+1Y8eOgLPCZI6thBCp21v36m y7sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V8Cc7Gni; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e4si3127953edv.36.2021.02.25.04.57.09; Thu, 25 Feb 2021 04:57:09 -0800 (PST) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V8Cc7Gni; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233644AbhBYMzw (ORCPT + 9 others); Thu, 25 Feb 2021 07:55:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:52422 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229596AbhBYMzs (ORCPT ); Thu, 25 Feb 2021 07:55:48 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6003364EB7; Thu, 25 Feb 2021 12:55:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614257707; bh=u5eRUZXSfVrVHiNGu0vpYTNA/pISHvCVfDY7NxwSxHk=; h=From:To:Cc:Subject:Date:From; b=V8Cc7Gni8ewcfye1sgAqtDO1AoRyS2fHVsthPDK73YIrkQJKkLX7ZmbVpSLssrYKe qoPGRrPrTtd8bu1+pCZLO0vvNauoT3w6BVekXxB0fP9QysqO7/cXlTmdERb6KrEGJQ YNwH+uXy/Uu6C/5tAFQ+OAfAq/jhO7PMWk426CBo5RETi0XDIVpN7IUCtwn2zD6ZGc LmxWykaKRteQUNwIuYGK1q0crhOkYzMMsiEzfjuKRJcN2PW3rlZylE1FYdi41ZjElG U5JkPmHHLFRWF8DBA3SCEaQ5Q14p278z7x7g5J0d41oR3Slq503S6wpc2GcR5HmK+I Wr3HbrnoA+/CA== From: Arnd Bergmann To: Saeed Mahameed , Leon Romanovsky , "David S. Miller" , Jakub Kicinski , Dmytro Linkin , Vlad Buslov , Roi Dayan Cc: Arnd Bergmann , Eli Britstein , Eli Cohen , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net/mlx5e: fix mlx5e_tc_tun_update_header_ipv6 dummy definition Date: Thu, 25 Feb 2021 13:54:54 +0100 Message-Id: <20210225125501.1792072-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 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. Fixes: c7b9038d8af6 ("net/mlx5e: TC preparation refactoring for routing update event") Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) -- 2.29.2 Reviewed-by: Vlad Buslov 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,