From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org, qemu-block@nongnu.org,
Stefan Hajnoczi <stefanha@redhat.com>
Cc: Alexander Bulekov <alxndr@bu.edu>, Thomas Huth <thuth@redhat.com>,
Darren Kenny <darren.kenny@oracle.com>,
qemu-trivial@nongnu.org
Subject: Re: [PATCH] scripts/checkpatch: Avoid recommending legacy qemu_bh_new_guarded()
Date: Mon, 6 Oct 2025 06:13:28 +0200 [thread overview]
Message-ID: <86053cd3-fd3e-4b34-8bce-9a93ab3f72a6@linaro.org> (raw)
In-Reply-To: <2891f8d5-e4ea-433f-84ba-a878875bb4d6@linaro.org>
ping?
On 24/9/25 18:40, Philippe Mathieu-Daudé wrote:
> (forgot to Cc qemu-block@nongnu.org)
>
> On 24/9/25 18:39, Philippe Mathieu-Daudé wrote:
>> qemu_bh_new_guarded() is considered legacy since commit 9c86c97f12c
>> ("async: Add an optional reentrancy guard to the BH API"); recommend
>> the new API: aio_bh_new_guarded().
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>> scripts/checkpatch.pl | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index 91616c974f2..6a0c06bebb9 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -3197,9 +3197,9 @@ sub process {
>> if ($line =~ /\bsignal\s*\(/ && !($line =~ /SIG_(?:IGN|
>> DFL)/)) {
>> ERROR("use sigaction to establish signal handlers;
>> signal is not portable\n" . $herecurr);
>> }
>> -# recommend qemu_bh_new_guarded instead of qemu_bh_new
>> - if ($realfile =~ /.*\/hw\/.*/ && $line =~ /
>> \bqemu_bh_new\s*\(/) {
>> - ERROR("use qemu_bh_new_guarded() instead of qemu_bh_new()
>> to avoid reentrancy problems\n" . $herecurr);
>> +# recommend aio_bh_new_guarded instead of legacy qemu_bh_new /
>> qemu_bh_new_guarded
>> + if ($realfile =~ /.*\/hw\/.*/ && $line =~ /
>> \bqemu_bh_new(_guarded)?\s*\(/) {
>> + ERROR("use aio_bh_new_guarded() instead of qemu_bh_new*()
>> to avoid reentrancy problems\n" . $herecurr);
>> }
>> # recommend aio_bh_new_guarded instead of aio_bh_new
>> if ($realfile =~ /.*\/hw\/.*/ && $line =~ /
>> \baio_bh_new\s*\(/) {
>
prev parent reply other threads:[~2025-10-06 4:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 16:39 [PATCH] scripts/checkpatch: Avoid recommending legacy qemu_bh_new_guarded() Philippe Mathieu-Daudé
2025-09-24 16:40 ` Philippe Mathieu-Daudé
2025-10-06 4:13 ` Philippe Mathieu-Daudé [this message]
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=86053cd3-fd3e-4b34-8bce-9a93ab3f72a6@linaro.org \
--to=philmd@linaro.org \
--cc=alxndr@bu.edu \
--cc=darren.kenny@oracle.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=stefanha@redhat.com \
--cc=thuth@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;
as well as URLs for NNTP newsgroup(s).