From: Sean Christopherson <seanjc@google.com>
To: Piotr Zarycki <piotr.zarycki@gmail.com>
Cc: pbonzini@redhat.com, shuah@kernel.org, dmatlack@google.com,
vkuznets@redhat.com, kvm@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: selftests: hyperv_tlb_flush: use swap() to swap PTEs
Date: Thu, 28 May 2026 06:13:16 -0700 [thread overview]
Message-ID: <ahg_bNoktd0XOKV8@google.com> (raw)
In-Reply-To: <20260528094542.2529735-1-piotr.zarycki@gmail.com>
On Thu, May 28, 2026, Piotr Zarycki wrote:
> Replace the open-coded swap with the swap() macro.
>
> Signed-off-by: Piotr Zarycki <piotr.zarycki@gmail.com>
> ---
> tools/testing/selftests/kvm/include/test_util.h | 2 ++
> tools/testing/selftests/kvm/x86/hyperv_tlb_flush.c | 6 +-----
> 2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/tools/testing/selftests/kvm/include/test_util.h b/tools/testing/selftests/kvm/include/test_util.h
> index d9b433b834f1..a66bc9ccba65 100644
> --- a/tools/testing/selftests/kvm/include/test_util.h
> +++ b/tools/testing/selftests/kvm/include/test_util.h
> @@ -26,6 +26,8 @@
>
> #define msecs_to_usecs(msec) ((msec) * 1000ULL)
>
> +#define swap(a, b) do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
This belongs in a common tools/ header, not in KVM's test_util.h. I don't see
an obvious place, maybe tools/include/linux/kernel.h?
next prev parent reply other threads:[~2026-05-28 13:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-28 9:45 [PATCH] KVM: selftests: hyperv_tlb_flush: use swap() to swap PTEs Piotr Zarycki
2026-05-28 13:13 ` Sean Christopherson [this message]
2026-05-28 14:07 ` Piotr Zarycki
2026-05-28 14:10 ` [PATCH v2] " Piotr Zarycki
2026-05-28 14:35 ` sashiko-bot
2026-05-28 15:35 ` Piotr Zarycki
2026-05-28 16:04 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ahg_bNoktd0XOKV8@google.com \
--to=seanjc@google.com \
--cc=dmatlack@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=piotr.zarycki@gmail.com \
--cc=shuah@kernel.org \
--cc=vkuznets@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox