Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967622AbdD0LzT (ORCPT ); Thu, 27 Apr 2017 07:55:19 -0400 Received: from mail-ve1eur01on0082.outbound.protection.outlook.com ([104.47.1.82]:18655 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1033974AbdD0LzI (ORCPT ); Thu, 27 Apr 2017 07:55:08 -0400 Authentication-Results: arndb.de; dkim=none (message not signed) header.d=none;arndb.de; dmarc=none action=none header.from=mellanox.com; Date: Thu, 27 Apr 2017 14:55:13 +0300 From: Leon Romanovsky To: Arnd Bergmann CC: Saeed Mahameed , Matan Barak , "David S. Miller" , Erez Shitrit , Dan Carpenter , Stephen Hemminger , , , Subject: Re: [PATCH net-next] mlx5: work around unused function warning Message-ID: <20170427115513.GH14088@mtr-leonro.local> References: <20170427110421.2431598-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="R4RAxL8G0iuuxuj8" Content-Disposition: inline In-Reply-To: <20170427110421.2431598-1-arnd@arndb.de> User-Agent: Mutt/1.8.0 (2017-02-23) X-Originating-IP: [213.57.247.46] X-ClientProxiedBy: AM5PR0101CA0014.eurprd01.prod.exchangelabs.com (2603:10a6:203:2d::24) To DB5PR0501MB1926.eurprd05.prod.outlook.com (2a01:111:e400:c584::19) X-MS-Office365-Filtering-Correlation-Id: aca5d92b-c803-47e2-00ab-08d48d643eb5 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081)(201703131423075)(201703031133081);SRVR:DB5PR0501MB1926; X-Microsoft-Exchange-Diagnostics: 1;DB5PR0501MB1926;3:8R9w4S8pGVVGC4dNkcMQJiJtC01BoRD6LbpetFpGxEehM5ob9c6BMGB2kjRjIqDDZVNZyZVA6r4CvozWUki7INCHry1EQeQRvQ+yvkW7IcLD/5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7+LW1lwdYbMvDl6m3+dK5irtbNn3tKbXB82MyMnsaY6ukRW3JlainVpbTFyAKmwNDmaDmJ/SGfukXJQXF0jkZuCRidIumdcrno/kqA/iPpbyMCaN91XIe1Qj6bG8/rOV0HdSFbQHIiPIbdiZAmuVXpmYsacgVSUr648mCzovdqTI0LzmA08IQvq5uiQxxbtfX5ziouu5pWSLkrUeoCtgGbQMaSqQiYn5Sl+a227dlYG1wSQSbU18NUi7vQOYCVNCIZzCduy8gihdm1SfmPGNeDxY1RoN621A9l88zkgxR1xS9f8iv6fuV+qkZZibPWr24cglU48gTFKn4ahQ4AMw7y+GRi8ERZUEq4UYTCS90aMYW8my9saZvH6FALVpJMSgXEQ9S9AwhHL4aYzz39044Ek+gIur6l91c/wgg6vaolArNYurmz X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(6055026)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(20161123564025)(20161123562025)(20161123560025)(6072148);SRVR:DB5PR0501MB1926;BCL:0;PCL:0;RULEID:;SRVR:DB5PR0501MB1926; X-Microsoft-Exchange-Diagnostics: 1;DB5PR0501MB1926;4:njv4x37tdUGwGd6KrkvyDpDGncLLGAejObhBNGvJ6mTOVnXesbWJ5f1aK2Z1lBHYMJgmN8NORHrrAfFVVy0bOXIWQvkR1YnPnbDKHsASkjSQczcF4jHViwCiXGxCY/9oGAfhiakxuWflIRHkvTR1sAx+yJi3PD0mOki8GT+RLlK1vjWtR+IACh60W0hqPbQpzHcgLXvQmDsfxqzAppZqSXFEyxYNjCg9beVBq2XFq/qL1MC/hk3mESiwMz11KhuQ5BIzuEWFk71ySjFsJE/qUBk4vySo9SYJ5f6H2HVTgiJH/JC8QqispwYj7iCXKQmk/ca9tDGB67g+BaX1UWG6HZAoIOe6uFMT99z/ok8ltzn3CtfT9n8LkfQKRKLpcBthFIs7IOvJTdhyqgucCjLwmBwIc+te/DaBqnGV/auD+1by8/lFV4narFo6qsXHMBP9Y28TECER5gZ+3BvrcxWRkCEt9FK+RHl0Q0kFoMR7glwkDqdaU3xztk20iDu19vO5FitUuOt6edJVSV2L4F6wOLO0L4DXPXsiPipLwgd3rzP03pjCVzrSe89p2mzDnUNJ/GBatG5TrUJk3Urkd4+AiqaX/FqCw56LUehgCTe/0eWUkXHcEeBnHWAddJSx4v652MPMze1GFNQ8UlxUxBDti7ShqBOfwZGb8RU+MB5OK9br48w5jO4WoFd+faZfNQSSQUNs5/XcL8GvEexiqp76BtSFbF4Nm8D29kqPyVTjHFk= X-Forefront-PRVS: 029097202E X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6069001)(6009001)(39410400002)(39850400002)(39860400002)(39400400002)(39840400002)(39450400003)(209900001)(51914003)(24454002)(260700001)(5660300001)(98436002)(21480400002)(229853002)(33656002)(512954002)(84326002)(66066001)(6116002)(3846002)(1076002)(76506005)(42186005)(53376002)(38730400002)(110136004)(305945005)(2906002)(6486002)(189998001)(4326008)(8676002)(53936002)(81166006)(6306002)(9686003)(54906002)(54356999)(50986999)(76176999)(966004)(6666003)(6916009)(86362001)(6496005)(6246003)(2950100002)(25786009)(18370500001)(2700100001)(6606295002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB5PR0501MB1926;H:localhost;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DB5PR0501MB1926;23:I9WVmLUEv5uLOm92gf4OJmp2qzKuUx5OpOnZmOW?= =?us-ascii?Q?2Zj4MJr/QZSmejo3yi4+sNjajbc7CqS1cLdnKaDCcXfVZ2Tp9l99b33VquCJ?= =?us-ascii?Q?Cko58XBUj+MhluIoNNCfCkMqUoW5PHFT+FAVztANysQQCV37zCbGs5y9qBWS?= =?us-ascii?Q?WlYqdqbSw6Ou3edpZXDZDcy7Iwm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qpbahR/kr/8pzX3BsyMbwEtaI=;24:y0BCCkkaV48DNTzzvNAPkbQX+UzErFMrGv/qoxPc6bodaqfW9zia6G+nSI6V/6cM9/nX7ZLDZwA8LzxVWwcyBpJiZKmdnA/eCgWvbsNhLNo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DB5PR0501MB1926;7:xfLV+wQYE7I9BLGzUB6T4W28afBr+AaRnPCRuzKyjOoG+7VaGVoZj/xNJc+HrBXpYkAy/CHp6YQYQxrHoM7/X748DgmmIWv+x8TWyPs3I/vo9so2x7tFpJKOnXJ8Hp/r3KfjQbTcdQVsFeG5HZ3YvKaXKbClEPIHOTSyUBBARWmJOOCQqxWNtD+9MGo0Ts0ISZKKKBiSVPUnhERUbFOj/PA7V0JBCxmdFltOjVeGzzFoi6tX8KHXGfSuaCqISBK6tFPKUEz/pO3qJXtffkbnJHHysUsF38UNb6nAcbVN+bGt86TxgvQldBpFbgRyMjgR9k8VWo2sA8je+umi2Pj1QQ== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2017 11:55:05.1465 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR0501MB1926 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3709 Lines: 95 --R4RAxL8G0iuuxuj8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > --- > 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 > --R4RAxL8G0iuuxuj8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkhr/r4Op1/04yqaB5GN7iDZyWKcFAlkB3CEACgkQ5GN7iDZy WKfGFhAAiQRLMpSOJJp8i4rykwGuI+/a49mQcK6kB+ACBS10YcSW0iKSEIVC79SJ H8pYQprpi7hhma0pwIZfxjsq38PAlrG6yFPW+qLlys0047EgQ9PNn8dxRC16R5kr bZygTK6dTei6Ilb8XQgINqXZ/A2aXaIJAtZyZDx9Ag5xsLmuNp6mQQfSc4m6kRVQ RvjJC2v8BkRmWq5jLugIUdKKYI/zBbezKSnbgj9N75v8BWJrVARmMrgm05zvtEjN vTto/nFJFW5VFCdUfHKg6Z3r8qngp7erCINbqY4DBwU2aOqWVSEEg6fww2O2Sr7H mCoYm7xiUvmpe/uMdntPNNAXG0sJzV9R9V9bGABAsTS1eume3i9iDebzj7lhfHVv MRlbjWsFgGenpSPILWGcJqD/6HwwpgWzd1hPrD86U0qxbW9buhhpnvgXooOib0q4 6fiCqtZYonI8RIHzgHWkhIUz/C0Z7WBc89TuVlKMQXAUoJRVT+XbqWIEt4D60GAn 03unDR0/D34d68xVuRrxd9PctXLcoO0bAclt7v7NnwHY5uiPVh0+on75beTefo9k k0OvWzNvCvM8Laha1Lbf5DtclutOy7L/WYHMivy5q6am5eVeszMnokfF5DFQ/nhh LO/ieKvWTUHY4DE/E+maM6xP9TgEsdW7KOIrH+emxdYSu1B1rcY= =04CU -----END PGP SIGNATURE----- --R4RAxL8G0iuuxuj8--