netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>
Cc: Saeed Mahameed <saeedm@nvidia.com>,
	netdev@vger.kernel.org, Tariq Toukan <tariqt@nvidia.com>,
	Adham Faris <afaris@nvidia.com>, Gal Pressman <gal@nvidia.com>
Subject: [net-next 01/14] net/mlx5: Expose port.c/mlx5_query_module_num() function
Date: Mon, 24 Jul 2023 15:44:13 -0700	[thread overview]
Message-ID: <20230724224426.231024-2-saeed@kernel.org> (raw)
In-Reply-To: <20230724224426.231024-1-saeed@kernel.org>

From: Adham Faris <afaris@nvidia.com>

Make mlx5_query_module_num() defined in port.c, a non-static, so it can
be used by other files.

Signed-off-by: Adham Faris <afaris@nvidia.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h | 1 +
 drivers/net/ethernet/mellanox/mlx5/core/port.c      | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
index c4be257c043d..6cebc8417282 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
@@ -176,6 +176,7 @@ static inline int mlx5_flexible_inlen(struct mlx5_core_dev *dev, size_t fixed,
 
 int mlx5_query_hca_caps(struct mlx5_core_dev *dev);
 int mlx5_query_board_id(struct mlx5_core_dev *dev);
+int mlx5_query_module_num(struct mlx5_core_dev *dev, int *module_num);
 int mlx5_cmd_init(struct mlx5_core_dev *dev);
 void mlx5_cmd_cleanup(struct mlx5_core_dev *dev);
 void mlx5_cmd_set_state(struct mlx5_core_dev *dev,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/port.c b/drivers/net/ethernet/mellanox/mlx5/core/port.c
index 0daeb4b72cca..be70d1f23a5d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/port.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/port.c
@@ -271,7 +271,7 @@ void mlx5_query_port_oper_mtu(struct mlx5_core_dev *dev, u16 *oper_mtu,
 }
 EXPORT_SYMBOL_GPL(mlx5_query_port_oper_mtu);
 
-static int mlx5_query_module_num(struct mlx5_core_dev *dev, int *module_num)
+int mlx5_query_module_num(struct mlx5_core_dev *dev, int *module_num)
 {
 	u32 in[MLX5_ST_SZ_DW(pmlp_reg)] = {0};
 	u32 out[MLX5_ST_SZ_DW(pmlp_reg)];
-- 
2.41.0


  reply	other threads:[~2023-07-24 22:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24 22:44 [pull request][net-next 00/14] mlx5 updates 2023-07-24 Saeed Mahameed
2023-07-24 22:44 ` Saeed Mahameed [this message]
2023-07-24 22:44 ` [net-next 02/14] net/mlx5: Expose NIC temperature via hardware monitoring kernel API Saeed Mahameed
2023-07-26  3:31   ` Jakub Kicinski
2023-07-26 21:34     ` Saeed Mahameed
2023-07-24 22:44 ` [net-next 03/14] net/mlx5: Use shared code for checking lag is supported Saeed Mahameed
2023-07-24 22:44 ` [net-next 04/14] net/mlx5: Devcom, Infrastructure changes Saeed Mahameed
2023-07-24 22:44 ` [net-next 05/14] net/mlx5e: E-Switch, Register devcom device with switch id key Saeed Mahameed
2023-07-24 22:44 ` [net-next 06/14] net/mlx5e: E-Switch, Allow devcom initialization on more vports Saeed Mahameed
2023-07-24 22:44 ` [net-next 07/14] net/mlx5: Re-organize mlx5_cmd struct Saeed Mahameed
2023-07-24 22:44 ` [net-next 08/14] net/mlx5: Remove redundant cmdif revision check Saeed Mahameed
2023-07-24 22:44 ` [net-next 09/14] net/mlx5: split mlx5_cmd_init() to probe and reload routines Saeed Mahameed
2023-07-24 22:44 ` [net-next 10/14] net/mlx5: Allocate command stats with xarray Saeed Mahameed
2023-07-24 22:44 ` [net-next 11/14] net/mlx5e: Remove duplicate code for user flow Saeed Mahameed
2023-07-24 22:44 ` [net-next 12/14] net/mlx5e: Make flow classification filters static Saeed Mahameed
2023-07-24 22:44 ` [net-next 13/14] net/mlx5: Don't check vport->enabled in port ops Saeed Mahameed
2023-07-24 22:44 ` [net-next 14/14] net/mlx5: Remove pointless devlink_rate checks Saeed Mahameed

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=20230724224426.231024-2-saeed@kernel.org \
    --to=saeed@kernel.org \
    --cc=afaris@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.com \
    /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;
as well as URLs for NNTP newsgroup(s).