KVM: PPC: booke: Use min() in watchdog_next_timeout()
Subsystems (3)
PATCH 1/2 KVM: PPC: booke: Use min() in watchdog_next_timeout()
Replace min_t() with the simpler min() macro since the values are unsigned and compatible.
--- arch/powerpc/kvm/booke.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kvm/booke.c +1 -1
@@ -598,7 +598,7 @@ static unsigned long watchdog_next_timeout(struct kvm_vcpu *vcpu)if (do_div (nr_jiffies, tb_ticks_per_jiffy)) nr_jiffies++; - return min_t(unsigned long long, nr_jiffies, TIMER_NEXT_MAX_DELTA); +return min (nr_jiffies,TIMER_NEXT_MAX_DELTA ); }static void arm_next_watchdog (struct kvm_vcpu *vcpu)
PATCH 2/2 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.
--- arch/powerpc/kvm/powerpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/kvm/powerpc.c +2 -2
@@ -635,9 +635,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 ;
Re: [PATCH 2/2] KVM: PPC: Use min() in kvm_vm_ioctl_check_extension()
Quoted 4 lines · Thorsten Blum
Replace
min_t()with the simplermin()macro since the values are unsigned and compatible.Signed-off-by Thorsten Blum <[email protected]>
Looks good to me. Feel free to add:
Quoted 4 lines · Thorsten Blum
Replace
min_t()with the simplermin()macro since the values are unsigned and compatible.Signed-off-by Thorsten Blum <[email protected]>
Looks good to me. Feel free to add:
Quoted 4 lines · Thorsten Blum
Replace
min_t()with the simplermin()macro since the values are unsigned and compatible.
Applied to powerpc/next.
[1/2] KVM: PPC: booke: Use min() in watchdog_next_timeout()
https://git.kernel.org/powerpc/c/ad0889338bfed33da6b8127d7d8ae0a4d6e4cd5d [2/2] KVM: PPC: Use min() in kvm_vm_ioctl_check_extension() https://git.kernel.org/powerpc/c/0fcdb510932b90160c47d3c38f6ce43852d7e14f
cheers