From: Dave Hansen <dave.hansen@intel.com>
To: Richard Lyu <richard.lyu@suse.com>, Thomas Gleixner <tglx@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/apic/msi: Use guard(mutex) in dmar_get_irq_domain()
Date: Wed, 11 Mar 2026 08:03:53 -0700 [thread overview]
Message-ID: <697cdfdc-027a-4170-b31f-349cb01dd1d0@intel.com> (raw)
In-Reply-To: <20260311145944.85399-1-richard.lyu@suse.com>
On 3/11/26 07:59, Richard Lyu wrote:
> The dmar_get_irq_domain() function uses a mutex to protect the
> initialization of the dmar_domain. Using guard(mutex) simplifies the
> control flow, removes the need for a 'out' label, and ensures the
> lock is automatically released regardless of the return path.
I think these are kinda like whitespace fixes: If you're fixing a bug or
otherwise refactoring the code, go right ahead and convert over to
guard(). Otherwise, they're not worth the code churn.
next prev parent reply other threads:[~2026-03-11 15:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 14:59 [PATCH] x86/apic/msi: Use guard(mutex) in dmar_get_irq_domain() Richard Lyu
2026-03-11 15:03 ` Dave Hansen [this message]
2026-03-11 15:15 ` Richard Lyu
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=697cdfdc-027a-4170-b31f-349cb01dd1d0@intel.com \
--to=dave.hansen@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=richard.lyu@suse.com \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/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