]> www.infradead.org Git - nvme.git/commit
mlxsw: pci: Remove mlxsw_pci_sdq_count()
authorAmit Cohen <amcohen@nvidia.com>
Tue, 2 Apr 2024 13:54:26 +0000 (15:54 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Apr 2024 02:50:41 +0000 (19:50 -0700)
commit0cd1453b7e55064d06b49eebe34ffb43748ba12e
treebdcc833cc96fb690aa93b0c1ec311bbb15ef9b7f
parent1df7d871e3491de2f53afafedef8383185a3f613
mlxsw: pci: Remove mlxsw_pci_sdq_count()

The number of SDQs is stored as part of 'mlxsw_pci' structure. In some
cases, the driver uses this value and in some cases it calls
mlxsw_pci_sdq_count() to get the value. Align the code to use the
stored value. This simplifies the code and makes it clearer that the
value is always the same. Rename 'mlxsw_pci->num_sdq_cqs' to
'mlxsw_pci->num_sdqs' as now it is used not only in CQ context.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/0c8788506d9af35d589dbf64be35a508fd63d681.1712062203.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/pci.c