Commit 0cd1453
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>1 parent 1df7d87 commit 0cd1453
1 file changed
+7
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | 191 | | |
197 | 192 | | |
198 | 193 | | |
| |||
391 | 386 | | |
392 | 387 | | |
393 | 388 | | |
394 | | - | |
| 389 | + | |
395 | 390 | | |
396 | 391 | | |
397 | 392 | | |
| |||
457 | 452 | | |
458 | 453 | | |
459 | 454 | | |
460 | | - | |
| 455 | + | |
461 | 456 | | |
462 | 457 | | |
463 | 458 | | |
| |||
735 | 730 | | |
736 | 731 | | |
737 | 732 | | |
738 | | - | |
| 733 | + | |
739 | 734 | | |
740 | 735 | | |
741 | | - | |
| 736 | + | |
742 | 737 | | |
743 | 738 | | |
744 | 739 | | |
| |||
1112 | 1107 | | |
1113 | 1108 | | |
1114 | 1109 | | |
1115 | | - | |
| 1110 | + | |
1116 | 1111 | | |
1117 | 1112 | | |
1118 | 1113 | | |
| |||
1780 | 1775 | | |
1781 | 1776 | | |
1782 | 1777 | | |
1783 | | - | |
| 1778 | + | |
1784 | 1779 | | |
1785 | 1780 | | |
1786 | 1781 | | |
| |||
0 commit comments