Commit 30a500e2 authored by Mitch Williams's avatar Mitch Williams Committed by Jeff Kirsher

i40evf: use min_t

Checkpatch complained in an earlier patch about using min(), but that
change would have been completely unrelated to the point of that patch.
So fix it here.

Change-ID: I2cd87b39cfd406850d283b88f259757a6bcd14cd
Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
Signed-off-by: default avatarCatherine Sullivan <catherine.sullivan@intel.com>
Tested-by: default avatarSibai Li <sibai.li@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 96d47704
...@@ -1140,8 +1140,8 @@ static int i40evf_set_interrupt_capability(struct i40evf_adapter *adapter) ...@@ -1140,8 +1140,8 @@ static int i40evf_set_interrupt_capability(struct i40evf_adapter *adapter)
* than CPU's. So let's be conservative and only ask for * than CPU's. So let's be conservative and only ask for
* (roughly) twice the number of vectors as there are CPU's. * (roughly) twice the number of vectors as there are CPU's.
*/ */
v_budget = min(pairs, (int)(num_online_cpus() * 2)) + NONQ_VECS; v_budget = min_t(int, pairs, (int)(num_online_cpus() * 2)) + NONQ_VECS;
v_budget = min(v_budget, (int)adapter->vf_res->max_vectors); v_budget = min_t(int, v_budget, (int)adapter->vf_res->max_vectors);
/* A failure in MSI-X entry allocation isn't fatal, but it does /* A failure in MSI-X entry allocation isn't fatal, but it does
* mean we disable MSI-X capabilities of the adapter. * mean we disable MSI-X capabilities of the adapter.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment