From nobody Fri Nov 14 22:18:07 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1759762825; cv=none; d=zohomail.com; s=zohoarc; b=Bzzpxg9Q/fEpVSE5u0NYl5zRR2GTLDQHrNhODxynPVmk8tbFIqzHS/zpMIbKSoOnuZ6kk1/+/fut2VHAbWV6+SUY7bcAX0H9qiiwb1lYWplol7y0EtSUTeUCWJBLGlyvTISAZQnL5jpli8RPjDitBQEblvA36JEmoNFxZkmqXoE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1759762825; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=D+LbvyMWP4ViOXVvoMDTR0jnF4qIs9LPcKykDLlvojE=; b=El2H4pbHCUp7EGT79/WNlyQJH9dtjxliEsoYSUqR8gIA6N4z8OIekwcnrcacBR1/ZwEAPEnAW33y6Mx6UStMte7PxwXfFZJXlC8xk2AUeFCtdjOw4AMoFFQk93aWxumF/qbFOwcGDb22r/2jk2QWOIxvgyB+loD8B1R/diETPh4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17597628255021011.2472972178375; Mon, 6 Oct 2025 08:00:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v5mgm-00073s-UG; Mon, 06 Oct 2025 10:59:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v5mgX-0006wO-Vg for qemu-devel@nongnu.org; Mon, 06 Oct 2025 10:59:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v5mgL-0000rF-F5 for qemu-devel@nongnu.org; Mon, 06 Oct 2025 10:59:33 -0400 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-341-pyE3wA0gMRCQfNNyjQGTgA-1; Mon, 06 Oct 2025 10:59:13 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B11CB1955F27; Mon, 6 Oct 2025 14:59:12 +0000 (UTC) Received: from localhost (unknown [10.2.16.162]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 14DC919560A2; Mon, 6 Oct 2025 14:59:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1759762757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D+LbvyMWP4ViOXVvoMDTR0jnF4qIs9LPcKykDLlvojE=; b=NJ8igKxj2tmAHfRIh79lh5Js8dv0XkJIE3Hbbg0tpxqNtzOkflSRDri2D/6CFHqtdezDt6 iJKdrJo0VpxT0sqJqO27F5oV/axzVI19wXG8D9VWmwJ7DLg8RFgD6pFseYUB6drjWLUHr3 8HPPRlap2uT7Se5C2zveK60S39wnGEA= X-MC-Unique: pyE3wA0gMRCQfNNyjQGTgA-1 X-Mimecast-MFC-AGG-ID: pyE3wA0gMRCQfNNyjQGTgA_1759762752 From: Stefan Hajnoczi To: qemu-devel@nongnu.org Cc: Richard Henderson , qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Stefan Hajnoczi Subject: [PULL 1/1] scripts/checkpatch: Avoid recommending legacy qemu_bh_new_guarded() Date: Mon, 6 Oct 2025 10:59:08 -0400 Message-ID: <20251006145908.22594-2-stefanha@redhat.com> In-Reply-To: <20251006145908.22594-1-stefanha@redhat.com> References: <20251006145908.22594-1-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=stefanha@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.441, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1759762850802116601 From: Philippe Mathieu-Daud=C3=A9 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=C3=A9 Message-ID: <20250924163911.51479-1-philmd@linaro.org> Signed-off-by: Stefan Hajnoczi --- scripts/checkpatch.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 40b6955c69..d3d75f3f13 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3198,9 +3198,9 @@ sub process { if ($line =3D~ /\bsignal\s*\(/ && !($line =3D~ /SIG_(?:IGN|DFL)/)) { ERROR("use sigaction to establish signal handlers; signal is not portab= le\n" . $herecurr); } -# recommend qemu_bh_new_guarded instead of qemu_bh_new - if ($realfile =3D~ /.*\/hw\/.*/ && $line =3D~ /\bqemu_bh_new\s*\(/= ) { - ERROR("use qemu_bh_new_guarded() instead of qemu_bh_new() to avoid reen= trancy problems\n" . $herecurr); +# recommend aio_bh_new_guarded instead of legacy qemu_bh_new / qemu_bh_new= _guarded + if ($realfile =3D~ /.*\/hw\/.*/ && $line =3D~ /\bqemu_bh_new(_guar= ded)?\s*\(/) { + ERROR("use aio_bh_new_guarded() instead of qemu_bh_new*() to avoid reen= trancy problems\n" . $herecurr); } # recommend aio_bh_new_guarded instead of aio_bh_new if ($realfile =3D~ /.*\/hw\/.*/ && $line =3D~ /\baio_bh_new\s*\(/)= { --=20 2.51.0