From patchwork Thu Apr 27 11:04:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9702741 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8F139602CC for ; Thu, 27 Apr 2017 11:07:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95527285E5 for ; Thu, 27 Apr 2017 11:07:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89B12285EB; Thu, 27 Apr 2017 11:07:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D9BF285E5 for ; Thu, 27 Apr 2017 11:07:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968430AbdD0LEd (ORCPT ); Thu, 27 Apr 2017 07:04:33 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:63872 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965483AbdD0LEF (ORCPT ); Thu, 27 Apr 2017 07:04:05 -0400 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.129]) with ESMTPA (Nemesis) id 0LcCMD-1dmQAE21mH-00jYtI; Thu, 27 Apr 2017 13:03:51 +0200 From: Arnd Bergmann To: Saeed Mahameed , Matan Barak , Leon Romanovsky Cc: Arnd Bergmann , "David S. Miller" , Erez Shitrit , Dan Carpenter , Stephen Hemminger , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next] mlx5: work around unused function warning Date: Thu, 27 Apr 2017 13:04:02 +0200 Message-Id: <20170427110421.2431598-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:JpVSTikVIF3YmqX3OigTVtfc9ldVdkTY+GkBgq+15Zhadk3DGog 4Asrc3RUqXPP+WAvKiIap0qbv5N0toIlttnNq/9Cqg9b+44GsH7Y25ieuePqAzH3dEBim5V TXH4UT2JJSZwVt/Z9HTGF49c9qinORa5EYI1Y+7/vT5USBnp22TgitEBXDX3Z9itrypziuG X5hmCdVPX07O1JGPDASxw== X-UI-Out-Filterresults: notjunk:1; V01:K0:Wgh9QAPxgUk=:VkwK+IdbNdTjMp4VcnpjrQ GCEEENPtb7vlmWR2STrTUV/LogBOAQl1F2/Ndvr3qcXFaeElBi1ySy7P5E/wH8pXv1YX59YLG irbE7ixLqCZozCQnma1I8762HBRaTrBWzpKYKymD5eO/97t801X2daw5ao+2EZOoCkgwHsRsO rIZ8msc+pXt/CR19SI/P4Z5Mum3dA2itTjh8ggXjCxlevT4yq/g5W/wXY/ZxDIvqFiVVs7y2P k2+Fbqy2I5CfJ+7NGMTvlYAssRVZTE/nNIJImTzz/HVZBRPgFblFvoONPm0a1lMbsCmbAWxZu tXY1qZ8/PBXCnJlhj56uLU7Lcbd9XBEKHZBVQfJX8F5JsZd3EpqpQGYAiNP1tfhhxCIq1HN4J LmHHlPHHus3rdbgPeJ7NxC4lPZVgYcuiVRWiQEIs6GRqmjeHWmE97B24e1Zp1z1lvWl8nsUjY gHeYCXYkzQVKa+ug58Svqb4eKLfxcfTUU6gBznXJvAQdcIJW0IGvzZCZI7N/IAzQTBiyYRr9U M4+SXng3zUqe29GVEZQufVQl2ZvXXPxviBUEgedPj8jlDLhSsiCQVVCerDTRyDDu9mnp8byb1 qKNJkmTQvj/0BCx7uCdrVZ6d5OEWK7c9WyAKqrtkwC+2HpmLPpsXYV5TM/IWVq7uVk3/3aLxm eYPpyeszZmc7h3DZC45/k0SYqUPLMhhY8rqSnjlWh+HaUACqFPdgbrR5+K4fiJE0U9+I= Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The previous patch addressed a sparse warning but replaced it with a compiler warning when CONFIG_MODULES is disabled: drivers/net/ethernet/mellanox/mlx5/core/ipoib.c:485:13: error: 'mlx5_rdma_netdev_free' defined but not used [-Werror=unused-function] drivers/net/ethernet/mellanox/mlx5/core/ipoib.c:423:27: error: 'mlx5_rdma_netdev_alloc' defined but not used [-Werror=unused-function] We should never export 'static' functions, so this makes them global again but hides them in another #ifdef like the change before. Fixes: a7082ef066f0 ("mlx5: hide unused functions") Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c index 3c84e36af018..eb48f112dff4 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c @@ -405,7 +405,6 @@ static int mlx5i_xmit(struct net_device *dev, struct sk_buff *skb, return mlx5i_sq_xmit(sq, skb, &mah->av, dqpn, dqkey); } -#endif static int mlx5i_check_required_hca_cap(struct mlx5_core_dev *mdev) { @@ -420,10 +419,10 @@ static int mlx5i_check_required_hca_cap(struct mlx5_core_dev *mdev) return 0; } -static struct net_device *mlx5_rdma_netdev_alloc(struct mlx5_core_dev *mdev, - struct ib_device *ibdev, - const char *name, - void (*setup)(struct net_device *)) +struct net_device *mlx5_rdma_netdev_alloc(struct mlx5_core_dev *mdev, + struct ib_device *ibdev, + const char *name, + void (*setup)(struct net_device *)) { const struct mlx5e_profile *profile = &mlx5i_nic_profile; int nch = profile->max_nch(mdev); @@ -482,7 +481,7 @@ static struct net_device *mlx5_rdma_netdev_alloc(struct mlx5_core_dev *mdev, } EXPORT_SYMBOL(mlx5_rdma_netdev_alloc); -static void mlx5_rdma_netdev_free(struct net_device *netdev) +void mlx5_rdma_netdev_free(struct net_device *netdev) { struct mlx5e_priv *priv = mlx5i_epriv(netdev); const struct mlx5e_profile *profile = priv->profile; @@ -495,4 +494,4 @@ static void mlx5_rdma_netdev_free(struct net_device *netdev) mlx5e_destroy_mdev_resources(priv->mdev); } EXPORT_SYMBOL(mlx5_rdma_netdev_free); - +#endif