Commit 6c8e355
i40e: Consolidate checks whether given VSI is main
In the driver code there are 3 types of checks whether given
VSI is main or not:
1. vsi->type ==/!= I40E_VSI_MAIN
2. vsi ==/!= pf->vsi[pf->lan_vsi]
3. vsi->seid ==/!= pf->vsi[pf->lan_vsi]->seid
All of them are equivalent and can be consolidated. Convert cases
2 and 3 to case 1.
Reviewed-by: Michal Schmidt <mschmidt@redhat.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>1 parent 43f4466 commit 6c8e355
3 files changed
Lines changed: 16 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1241 | 1241 | | |
1242 | 1242 | | |
1243 | 1243 | | |
1244 | | - | |
| 1244 | + | |
1245 | 1245 | | |
1246 | 1246 | | |
1247 | 1247 | | |
| |||
1710 | 1710 | | |
1711 | 1711 | | |
1712 | 1712 | | |
1713 | | - | |
| 1713 | + | |
1714 | 1714 | | |
1715 | 1715 | | |
1716 | 1716 | | |
| |||
2292 | 2292 | | |
2293 | 2293 | | |
2294 | 2294 | | |
2295 | | - | |
| 2295 | + | |
2296 | 2296 | | |
2297 | 2297 | | |
2298 | 2298 | | |
| |||
2422 | 2422 | | |
2423 | 2423 | | |
2424 | 2424 | | |
2425 | | - | |
| 2425 | + | |
2426 | 2426 | | |
2427 | 2427 | | |
2428 | 2428 | | |
| |||
2495 | 2495 | | |
2496 | 2496 | | |
2497 | 2497 | | |
2498 | | - | |
| 2498 | + | |
2499 | 2499 | | |
2500 | 2500 | | |
2501 | 2501 | | |
| |||
2792 | 2792 | | |
2793 | 2793 | | |
2794 | 2794 | | |
2795 | | - | |
| 2795 | + | |
2796 | 2796 | | |
2797 | 2797 | | |
2798 | 2798 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
990 | 990 | | |
991 | 991 | | |
992 | 992 | | |
993 | | - | |
| 993 | + | |
994 | 994 | | |
995 | 995 | | |
996 | 996 | | |
| |||
1235 | 1235 | | |
1236 | 1236 | | |
1237 | 1237 | | |
1238 | | - | |
| 1238 | + | |
1239 | 1239 | | |
1240 | 1240 | | |
1241 | 1241 | | |
| |||
6812 | 6812 | | |
6813 | 6813 | | |
6814 | 6814 | | |
6815 | | - | |
| 6815 | + | |
6816 | 6816 | | |
6817 | 6817 | | |
6818 | 6818 | | |
| |||
9119 | 9119 | | |
9120 | 9120 | | |
9121 | 9121 | | |
9122 | | - | |
| 9122 | + | |
9123 | 9123 | | |
9124 | 9124 | | |
9125 | 9125 | | |
| |||
11994 | 11994 | | |
11995 | 11995 | | |
11996 | 11996 | | |
11997 | | - | |
| 11997 | + | |
11998 | 11998 | | |
11999 | 11999 | | |
12000 | 12000 | | |
| |||
13111 | 13111 | | |
13112 | 13112 | | |
13113 | 13113 | | |
13114 | | - | |
| 13114 | + | |
13115 | 13115 | | |
13116 | 13116 | | |
13117 | 13117 | | |
| |||
13179 | 13179 | | |
13180 | 13180 | | |
13181 | 13181 | | |
13182 | | - | |
| 13182 | + | |
13183 | 13183 | | |
13184 | 13184 | | |
13185 | 13185 | | |
| |||
14131 | 14131 | | |
14132 | 14132 | | |
14133 | 14133 | | |
14134 | | - | |
14135 | | - | |
| 14134 | + | |
14136 | 14135 | | |
14137 | 14136 | | |
14138 | 14137 | | |
| |||
14396 | 14395 | | |
14397 | 14396 | | |
14398 | 14397 | | |
14399 | | - | |
| 14398 | + | |
14400 | 14399 | | |
14401 | 14400 | | |
14402 | 14401 | | |
| |||
0 commit comments