All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@mellanox.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, jiri@mellanox.com, petrm@mellanox.com,
	mlxsw@mellanox.com, Ido Schimmel <idosch@mellanox.com>
Subject: [PATCH net-next 10/11] mlxsw: spectrum: Pass mlxsw_core as arg of mlxsw_sp_kvdl_resources_register()
Date: Thu, 29 Mar 2018 23:33:33 +0300	[thread overview]
Message-ID: <20180329203334.25575-11-idosch@mellanox.com> (raw)
In-Reply-To: <20180329203334.25575-1-idosch@mellanox.com>

From: Jiri Pirko <jiri@mellanox.com>

Pass struct mlxsw_core instead of devlink since it is nicer within mlxsw
code and we need both structs in mlxsw_sp_kvdl_resources_register()
anyway.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c      | 2 +-
 drivers/net/ethernet/mellanox/mlxsw/spectrum.h      | 2 +-
 drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index 0d95d2cb73e3..ca38a30fbe91 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -3878,7 +3878,7 @@ static int mlxsw_sp_resources_register(struct mlxsw_core *mlxsw_core)
 	if (err)
 		return err;
 
-	err = mlxsw_sp_kvdl_resources_register(devlink);
+	err = mlxsw_sp_kvdl_resources_register(mlxsw_core);
 	if  (err)
 		return err;
 
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
index c59a0d7d81d5..952d99decc23 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
@@ -442,7 +442,7 @@ void mlxsw_sp_kvdl_free(struct mlxsw_sp *mlxsw_sp, int entry_index);
 int mlxsw_sp_kvdl_alloc_size_query(struct mlxsw_sp *mlxsw_sp,
 				   unsigned int entry_count,
 				   unsigned int *p_alloc_size);
-int mlxsw_sp_kvdl_resources_register(struct devlink *devlink);
+int mlxsw_sp_kvdl_resources_register(struct mlxsw_core *mlxsw_core);
 
 struct mlxsw_sp_acl_rule_info {
 	unsigned int priority;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c
index 1b7280168e6b..fe4327f547d2 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c
@@ -354,9 +354,9 @@ static u64 mlxsw_sp_kvdl_large_chunks_occ_get(void *priv)
 	return mlxsw_sp_kvdl_part_occ(part);
 }
 
-int mlxsw_sp_kvdl_resources_register(struct devlink *devlink)
+int mlxsw_sp_kvdl_resources_register(struct mlxsw_core *mlxsw_core)
 {
-	struct mlxsw_core *mlxsw_core = devlink_priv(devlink);
+	struct devlink *devlink = priv_to_devlink(mlxsw_core);
 	static struct devlink_resource_size_params size_params;
 	u32 kvdl_max_size;
 	int err;
-- 
2.14.3

  parent reply	other threads:[~2018-03-29 20:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-29 20:33 [PATCH net-next 00/11] mlxsw: Various cleanups Ido Schimmel
2018-03-29 20:33 ` [PATCH net-next 01/11] mlxsw: spectrum_acl: Fix flex actions header ifndef define construct Ido Schimmel
2018-03-29 20:33 ` [PATCH net-next 02/11] mlxsw: spectrum_kvdl: Fix handling of resource_size_param Ido Schimmel
2018-03-29 20:33 ` [PATCH net-next 03/11] mlxsw: Constify devlink_resource_ops Ido Schimmel
2018-03-29 20:33 ` [PATCH net-next 04/11] mlxsw: spectrum: Change KVD linear parts from list to array Ido Schimmel
2018-03-29 20:33 ` [PATCH net-next 05/11] mlxsw: remove kvd_hash_granularity from config profile struct Ido Schimmel
2018-03-29 20:33 ` [PATCH net-next 06/11] mlxsw: core: Fix arg name of MLXSW_CORE_RES_VALID and MLXSW_CORE_RES_GET Ido Schimmel
2018-03-29 20:33 ` [PATCH net-next 07/11] mlxsw: Move "used_kvd_sizes" check to mlxsw_pci_config_profile Ido Schimmel
2018-03-29 20:33 ` [PATCH net-next 08/11] mlxsw: Move "resources_query_enable" out of mlxsw_config_profile Ido Schimmel
2018-03-29 20:33 ` [PATCH net-next 09/11] devlink: convert occ_get op to separate registration Ido Schimmel
2018-03-30 14:45   ` David Ahern
2018-04-01  7:44     ` Ido Schimmel
2018-04-03  7:32     ` Jiri Pirko
2018-04-03 14:33       ` David Ahern
2018-04-03 15:30         ` Jiri Pirko
2018-04-04  0:47           ` David Ahern
2018-04-04  6:25             ` Jiri Pirko
2018-04-04 22:59               ` Jakub Kicinski
2018-04-04 23:00                 ` David Ahern
2018-04-05  5:36                   ` Jiri Pirko
2018-03-29 20:33 ` Ido Schimmel [this message]
2018-03-29 20:33 ` [PATCH net-next 11/11] mlxsw: spectrum: Don't use resource ID of 0 Ido Schimmel
2018-04-01  1:54 ` [PATCH net-next 00/11] mlxsw: Various cleanups David Miller
2018-04-01  2:14   ` David Miller
2018-04-01  7:52     ` Ido Schimmel

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=20180329203334.25575-11-idosch@mellanox.com \
    --to=idosch@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=jiri@mellanox.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=petrm@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.