From patchwork Fri Apr 21 18:15:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 9693367 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 EBEF26038D for ; Fri, 21 Apr 2017 18:24:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E054D28635 for ; Fri, 21 Apr 2017 18:24:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D253728648; Fri, 21 Apr 2017 18:24:26 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham 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 7CA7128635 for ; Fri, 21 Apr 2017 18:24:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423675AbdDUSYF (ORCPT ); Fri, 21 Apr 2017 14:24:05 -0400 Received: from mail-oi0-f50.google.com ([209.85.218.50]:34773 "EHLO mail-oi0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423668AbdDUSX5 (ORCPT ); Fri, 21 Apr 2017 14:23:57 -0400 Received: by mail-oi0-f50.google.com with SMTP id x184so107221836oia.1 for ; Fri, 21 Apr 2017 11:23:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FslnqCXb8d82BvBCFXrac/ty5TUJ1i5110TTIVRe8Ow=; b=kLzmjb7CjU7LqimVlz5NuJrmgpPIcuz0DpUfzUCjPmAMFg+RrU+zk/SBPiMJzj0E5x OOL/UJE91JCOd4ytqOJ0blQ1vdjO7qXDZTg61Lsx5Jj4z+togBCScbHLlgK9KjPGeCbi PbDUGwydNQTGN3SpUrZUF5eTN3i0ePpFMSD3XOUUGsvqQxh5jSrhkwUJ95qzKvLyJZ5l Em2Iyzjs1E6DNxyT8n4zN9GQ8nedvDwDbxnoyvB2tow65ZmWi5NWHrxhKCu8sdMi5Xx+ FItn5joU+K4aerRcGDomT+KS96Q7hC3kmlXL4QN63mWY5A6U5wBPbWBAkVNTu4nGRIjX FnHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FslnqCXb8d82BvBCFXrac/ty5TUJ1i5110TTIVRe8Ow=; b=FpwG3NTy5zVFQk1v/z9GaystZ8jiXDaYHyyoqEQzGjqzFXNpuyw1q2osWdt9Vham6i 2SuigWiXg2T5g9DmCAzluP1GOnTmfUKcQFx5z1hOfOds0mpcqa1ptc80GSeQMbq8Rozk 8KJB2Q26itEyMWYQ/SeWFjj7KT2dW7RCnKXEPdSH1SIZm9cIXXwFGND7569HefdZKKMO 7q17zjBX4Zg9Myrmx9rSaXF7ijKZPOZEXZx4ucoGYMTif93cjR/0Wmu/jBnNxCNAjWRQ h/an1N3PkjAFiEfOnXfNZQlGaF3pugu/EU4zHA5fPGVR9CUPqB81Qzh5K7+K0ppmRM+3 YgPQ== X-Gm-Message-State: AN3rC/6jRgoWZH1RA/nTGUyYcoh/NN6HFs6DJNZmEh8Txpnqx9lTND52 +LDi30Fa5rD1pA== X-Received: by 10.84.179.99 with SMTP id a90mr17493069plc.26.1492798562282; Fri, 21 Apr 2017 11:16:02 -0700 (PDT) Received: from xeon-e3.wavecable.com (76-14-206-252.or.wavecable.com. [76.14.206.252]) by smtp.gmail.com with ESMTPSA id i15sm17317165pfj.51.2017.04.21.11.16.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Apr 2017 11:16:01 -0700 (PDT) From: Stephen Hemminger X-Google-Original-From: Stephen Hemminger To: davem@davemloft.net, saeedm@mellanox.com, matanb@mellanox.com, leonro@mellanox.com Cc: linux-rdma@vger.kernel.org, netdev@vger.kernel.org, Stephen Hemminger Subject: [PATCH net-next 1/3] mlx5: hide unused functions Date: Fri, 21 Apr 2017 11:15:56 -0700 Message-Id: <20170421181558.5414-2-sthemmin@microsoft.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170421181558.5414-1-sthemmin@microsoft.com> References: <20170421181558.5414-1-sthemmin@microsoft.com> 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 Fix sparse warnings in recent ipoib support. The RDMA functions are not used yet, hide behind #ifdef. Based on comment, they will eventually be local so make static. Signed-off-by: Stephen Hemminger --- drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c index ec78e637840f..3c84e36af018 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c @@ -178,7 +178,7 @@ static int mlx5i_init_tx(struct mlx5e_priv *priv) return 0; } -void mlx5i_cleanup_tx(struct mlx5e_priv *priv) +static void mlx5i_cleanup_tx(struct mlx5e_priv *priv) { struct mlx5i_priv *ipriv = priv->ppriv; @@ -359,9 +359,10 @@ static int mlx5i_close(struct net_device *netdev) return 0; } +#ifdef notusedyet /* IPoIB RDMA netdev callbacks */ -int mlx5i_attach_mcast(struct net_device *netdev, struct ib_device *hca, - union ib_gid *gid, u16 lid, int set_qkey) +static int mlx5i_attach_mcast(struct net_device *netdev, struct ib_device *hca, + union ib_gid *gid, u16 lid, int set_qkey) { struct mlx5e_priv *epriv = mlx5i_epriv(netdev); struct mlx5_core_dev *mdev = epriv->mdev; @@ -377,8 +378,8 @@ int mlx5i_attach_mcast(struct net_device *netdev, struct ib_device *hca, return err; } -int mlx5i_detach_mcast(struct net_device *netdev, struct ib_device *hca, - union ib_gid *gid, u16 lid) +static int mlx5i_detach_mcast(struct net_device *netdev, struct ib_device *hca, + union ib_gid *gid, u16 lid) { struct mlx5e_priv *epriv = mlx5i_epriv(netdev); struct mlx5_core_dev *mdev = epriv->mdev; @@ -395,7 +396,7 @@ int mlx5i_detach_mcast(struct net_device *netdev, struct ib_device *hca, return err; } -int mlx5i_xmit(struct net_device *dev, struct sk_buff *skb, +static int mlx5i_xmit(struct net_device *dev, struct sk_buff *skb, struct ib_ah *address, u32 dqpn, u32 dqkey) { struct mlx5e_priv *epriv = mlx5i_epriv(dev); @@ -404,6 +405,7 @@ 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) { @@ -418,10 +420,10 @@ static int mlx5i_check_required_hca_cap(struct mlx5_core_dev *mdev) return 0; } -struct net_device *mlx5_rdma_netdev_alloc(struct mlx5_core_dev *mdev, - struct ib_device *ibdev, - const char *name, - void (*setup)(struct net_device *)) +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 *)) { const struct mlx5e_profile *profile = &mlx5i_nic_profile; int nch = profile->max_nch(mdev); @@ -480,7 +482,7 @@ struct net_device *mlx5_rdma_netdev_alloc(struct mlx5_core_dev *mdev, } EXPORT_SYMBOL(mlx5_rdma_netdev_alloc); -void mlx5_rdma_netdev_free(struct net_device *netdev) +static void mlx5_rdma_netdev_free(struct net_device *netdev) { struct mlx5e_priv *priv = mlx5i_epriv(netdev); const struct mlx5e_profile *profile = priv->profile;