public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: Saeed Mahameed <saeedm-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	Erez Shitrit <erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Dan Carpenter
	<dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	Stephen Hemminger
	<stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org>,
	<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH net-next] mlx5: work around unused function warning
Date: Thu, 27 Apr 2017 14:55:13 +0300	[thread overview]
Message-ID: <20170427115513.GH14088@mtr-leonro.local> (raw)
In-Reply-To: <20170427110421.2431598-1-arnd-r2nGTMty4D4@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2700 bytes --]

On Thu, Apr 27, 2017 at 01:04:02PM +0200, Arnd Bergmann wrote:
> 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 <arnd-r2nGTMty4D4@public.gmane.org>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
>

Hi Arnd,

Thanks for the patch, but Stephen and Saeed already sent patch similar to it.
http://marc.info/?l=linux-netdev&m=149288674816288&w=2

Thanks

> 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
> --
> 2.9.0
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2017-04-27 11:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-27 11:04 [PATCH net-next] mlx5: work around unused function warning Arnd Bergmann
     [not found] ` <20170427110421.2431598-1-arnd-r2nGTMty4D4@public.gmane.org>
2017-04-27 11:55   ` Leon Romanovsky [this message]
2017-04-27 12:04     ` Arnd Bergmann
     [not found]       ` <CAK8P3a0kX4uNLBvLAHrhtmUc7eBLmD6dXA8=xxY+xJ4OsGFJbg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-27 13:13         ` Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170427115513.GH14088@mtr-leonro.local \
    --to=leonro-vpraknaxozvwk0htik3j/w@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=saeedm-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox