mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
KVM: PPC: Use min() in kvm_vm_ioctl_check_extension()
Replace min_t() with the simpler min() macro since the values are unsigned and compatible. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20260804112011.59416-4-thorsten.blum@linux.dev
This commit is contained in:
parent
ad0889338b
commit
0fcdb51093
|
|
@ -660,9 +660,9 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
|
|||
* implementations just count online CPUs.
|
||||
*/
|
||||
if (hv_enabled)
|
||||
r = min_t(unsigned int, num_present_cpus(), KVM_MAX_VCPUS);
|
||||
r = min(num_present_cpus(), KVM_MAX_VCPUS);
|
||||
else
|
||||
r = min_t(unsigned int, num_online_cpus(), KVM_MAX_VCPUS);
|
||||
r = min(num_online_cpus(), KVM_MAX_VCPUS);
|
||||
break;
|
||||
case KVM_CAP_MAX_VCPUS:
|
||||
r = KVM_MAX_VCPUS;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user