{"id":2227796,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2227796/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260424-force_rcu-v4-6-feccfaca0568@rsg.ci.i.u-tokyo.ac.jp/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.1/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260424-force_rcu-v4-6-feccfaca0568@rsg.ci.i.u-tokyo.ac.jp>","date":"2026-04-24T09:27:11","name":"[v4,6/6] scripts/checkpatch: Avoid false positive on empty blocks","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"23af5bdb3930814297e60adbd5700589019999ff","submitter":{"id":90980,"url":"http://patchwork.ozlabs.org/api/1.1/people/90980/?format=json","name":"Akihiko Odaki","email":"odaki@rsg.ci.i.u-tokyo.ac.jp"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260424-force_rcu-v4-6-feccfaca0568@rsg.ci.i.u-tokyo.ac.jp/mbox/","series":[{"id":501326,"url":"http://patchwork.ozlabs.org/api/1.1/series/501326/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501326","date":"2026-04-24T09:27:07","name":"virtio-gpu: Force RCU when unmapping blob","version":4,"mbox":"http://patchwork.ozlabs.org/series/501326/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2227796/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2227796/checks/","tags":{},"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=fail reason=\"key not found in DNS\" header.d=rsg.ci.i.u-tokyo.ac.jp\n header.i=@rsg.ci.i.u-tokyo.ac.jp header.a=rsa-sha256 header.s=rs20250326\n header.b=dbd146Ir;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g271y33P5z1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 19:28:54 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wGCpe-0008Ba-V2; Fri, 24 Apr 2026 05:28:19 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <odaki@rsg.ci.i.u-tokyo.ac.jp>)\n id 1wGCp5-0007Q8-17\n for qemu-devel@nongnu.org; Fri, 24 Apr 2026 05:27:43 -0400","from www3579.sakura.ne.jp ([49.212.243.89])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <odaki@rsg.ci.i.u-tokyo.ac.jp>)\n id 1wGCp0-0007aA-1K\n for qemu-devel@nongnu.org; Fri, 24 Apr 2026 05:27:42 -0400","from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp\n [133.11.54.205]) (authenticated bits=0)\n by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 63O9RHIi004358\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);\n Fri, 24 Apr 2026 18:27:27 +0900 (JST)\n (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp)"],"DKIM-Signature":"a=rsa-sha256; bh=wzGInr5tGeKcs9kj5j/LreDA3mI0ZOwS94BodO37T70=;\n c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp;\n h=From:Message-Id:To:Subject:Date;\n s=rs20250326; t=1777022847; v=1;\n b=dbd146IriZSMW+4HN59foUhN0HnPvlIRsHb0CLOVq8/r1gg4Su1Zf3SUe1ZanY+x\n 69Rn8dn6MogTtYzUUZQus3pRf2bpUp5ujX8+fwvV3vMqqVy/EghHTHo9R+DdU+ZS\n Hd7sqJrlkt6IGlCzl3+dgYbxEDuyhswFFQsDRh4XU9AdhQNc3DQQvDWIfFP+5ayH\n Lf6a9amxwK6JxPPS+IAA/w8U1tSYIJ7Srk7ocuVw2gabceyV9dySyy4a4jLOGeE2\n KfxMD2v31k+Ap+mlbvryJ5I34DI3H8ZHaXypDA3b94vwXfc5wJ2yzFCP7O0ONGyj\n zaxtXScjmvmDND+WKJak0A==","From":"Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>","Date":"Fri, 24 Apr 2026 18:27:11 +0900","Subject":"[PATCH v4 6/6] scripts/checkpatch: Avoid false positive on empty\n blocks","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","Message-Id":"<20260424-force_rcu-v4-6-feccfaca0568@rsg.ci.i.u-tokyo.ac.jp>","References":"<20260424-force_rcu-v4-0-feccfaca0568@rsg.ci.i.u-tokyo.ac.jp>","In-Reply-To":"<20260424-force_rcu-v4-0-feccfaca0568@rsg.ci.i.u-tokyo.ac.jp>","To":"qemu-devel@nongnu.org, Dmitry Osipenko <dmitry.osipenko@collabora.com>","Cc":"Paolo Bonzini <pbonzini@redhat.com>,\n \"Michael S. Tsirkin\" <mst@redhat.com>,\n =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>,\n Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>","X-Mailer":"b4 0.16-dev-16047","Received-SPF":"pass client-ip=49.212.243.89;\n envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp","X-Spam_score_int":"-16","X-Spam_score":"-1.7","X-Spam_bar":"-","X-Spam_report":"(-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1,\n DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=no autolearn_force=no","X-Spam_action":"no action","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"SUSPECT_CODE_INDENT checks the first line after a conditional statement.\nWhen the block is empty, the first line after the conditional is the\nclosing brace at the same indentation level, so checkpatch reports a\nbogus indentation error.\n\nIgnore same-indented braces and else statements, matching with:\nhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f6950a735f29e782bc219ece22bb91d6e1ab7bbc\n\nSigned-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>\n---\n scripts/checkpatch.pl | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)","diff":"diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl\nindex b77bd693288b..df92b92ac975 100755\n--- a/scripts/checkpatch.pl\n+++ b/scripts/checkpatch.pl\n@@ -2282,7 +2282,8 @@ sub process {\n \t\t\t#print \"line<$line> prevline<$prevline> indent<$indent> sindent<$sindent> check<$check> continuation<$continuation> s<$s> cond_lines<$cond_lines> stat_real<$stat_real> stat<$stat>\\n\";\n \n \t\t\tif ($check && (($sindent % 4) != 0 ||\n-\t\t\t    ($sindent <= $indent && $s ne ''))) {\n+\t\t\t    ($sindent <= $indent &&\n+\t\t\t     $s !~ /^\\s*(?:\\}|\\{|else\\b)/))) {\n \t\t\t\tERROR(\"suspect code indent for conditional statements ($indent, $sindent)\\n\" . $herecurr . \"$stat_real\\n\");\n \t\t\t}\n \t\t}\n","prefixes":["v4","6/6"]}