* [PATCH 1/2] KVM: PPC: booke: Use min() in watchdog_next_timeout()
@ 2026-08-04 11:20 Thorsten Blum
2026-08-04 11:20 ` [PATCH 2/2] KVM: PPC: Use min() in kvm_vm_ioctl_check_extension() Thorsten Blum
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Thorsten Blum @ 2026-08-04 11:20 UTC (permalink / raw)
To: Madhavan Srinivasan, Nicholas Piggin, Michael Ellerman,
Christophe Leroy (CS GROUP)
Cc: Thorsten Blum, linuxppc-dev, kvm, linux-kernel
Replace min_t() with the simpler min() macro since the values are
unsigned and compatible.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
arch/powerpc/kvm/booke.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index f3ddb24ece74..543479fc9630 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -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)
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] KVM: PPC: Use min() in kvm_vm_ioctl_check_extension()
2026-08-04 11:20 [PATCH 1/2] KVM: PPC: booke: Use min() in watchdog_next_timeout() Thorsten Blum
@ 2026-08-04 11:20 ` Thorsten Blum
2026-08-06 1:20 ` Ritesh Harjani
2026-08-06 1:19 ` [PATCH 1/2] KVM: PPC: booke: Use min() in watchdog_next_timeout() Ritesh Harjani
2026-08-09 13:13 ` Madhavan Srinivasan
2 siblings, 1 reply; 5+ messages in thread
From: Thorsten Blum @ 2026-08-04 11:20 UTC (permalink / raw)
To: Madhavan Srinivasan, Nicholas Piggin, Michael Ellerman,
Christophe Leroy (CS GROUP)
Cc: Thorsten Blum, linuxppc-dev, kvm, linux-kernel
Replace min_t() with the simpler min() macro since the values are
unsigned and compatible.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
arch/powerpc/kvm/powerpc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 00302399fc37..f76322be907d 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -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;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] KVM: PPC: booke: Use min() in watchdog_next_timeout()
2026-08-04 11:20 [PATCH 1/2] KVM: PPC: booke: Use min() in watchdog_next_timeout() Thorsten Blum
2026-08-04 11:20 ` [PATCH 2/2] KVM: PPC: Use min() in kvm_vm_ioctl_check_extension() Thorsten Blum
@ 2026-08-06 1:19 ` Ritesh Harjani
2026-08-09 13:13 ` Madhavan Srinivasan
2 siblings, 0 replies; 5+ messages in thread
From: Ritesh Harjani @ 2026-08-06 1:19 UTC (permalink / raw)
To: Thorsten Blum, Madhavan Srinivasan, Nicholas Piggin,
Michael Ellerman, Christophe Leroy (CS GROUP)
Cc: Thorsten Blum, linuxppc-dev, kvm, linux-kernel
Thorsten Blum <thorsten.blum@linux.dev> writes:
> Replace min_t() with the simpler min() macro since the values are
> unsigned and compatible.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Looks good to me. Feel free to add:
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] KVM: PPC: booke: Use min() in watchdog_next_timeout()
2026-08-04 11:20 [PATCH 1/2] KVM: PPC: booke: Use min() in watchdog_next_timeout() Thorsten Blum
2026-08-04 11:20 ` [PATCH 2/2] KVM: PPC: Use min() in kvm_vm_ioctl_check_extension() Thorsten Blum
2026-08-06 1:19 ` [PATCH 1/2] KVM: PPC: booke: Use min() in watchdog_next_timeout() Ritesh Harjani
@ 2026-08-09 13:13 ` Madhavan Srinivasan
2 siblings, 0 replies; 5+ messages in thread
From: Madhavan Srinivasan @ 2026-08-09 13:13 UTC (permalink / raw)
To: Nicholas Piggin, Michael Ellerman, Christophe Leroy (CS GROUP),
Thorsten Blum
Cc: linuxppc-dev, kvm, linux-kernel
On Tue, 04 Aug 2026 13:20:12 +0200, Thorsten Blum wrote:
> Replace min_t() with the simpler min() 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-08-09 13:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-04 11:20 [PATCH 1/2] KVM: PPC: booke: Use min() in watchdog_next_timeout() Thorsten Blum
2026-08-04 11:20 ` [PATCH 2/2] KVM: PPC: Use min() in kvm_vm_ioctl_check_extension() Thorsten Blum
2026-08-06 1:20 ` Ritesh Harjani
2026-08-06 1:19 ` [PATCH 1/2] KVM: PPC: booke: Use min() in watchdog_next_timeout() Ritesh Harjani
2026-08-09 13:13 ` Madhavan Srinivasan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.