From patchwork Fri Oct 25 06:37:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 177647 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3261042ill; Fri, 25 Oct 2019 00:09:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrtnbizm7aFiwa1ShSJYKNRTm8rS8X3dEgLXSOqhHHCmMkXL3aSiAH5dRtig64CFsjZTsr X-Received: by 2002:a17:906:31c1:: with SMTP id f1mr1927961ejf.242.1571987365214; Fri, 25 Oct 2019 00:09:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571987365; cv=none; d=google.com; s=arc-20160816; b=t0OrrgewVgmWNkdGPrpGtNwtsxQjMnAO4d9Kt0Ao/bgBSocS2HuVTkW7c31CneSHmB lVWdLEAFoczO9DHYH4ZXomE0DbFOlon8keJnk8+Cbc2s+iFxEZPS5JqgfhINrBFMoDa6 VFBRGzsSRSLZNfxHLyiv03K84cZW9AkiZKkzgG0rtzAPdZGFl13sZEAU2veCeZO7Rpev XdlEiZmM4ewC9Kjgge4izMDSW4pBQX/ZUpk4p+UQcKjcSFlj1KhiVEBXYZmjgjvjpgnP GcIqG+SPh1nJPygd70sBVduAX4CU922n7QXj08mAn20uqCfs7qX+ySYTIKt2LQ6uQlG8 CkoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=4Fxm3k4cHBOBik3KvWndMPIE/3gLAlHObkdSa6YWSiE=; b=0jPuQVEM5ecMHVTp/dH3iGecSZoHoC37jt56OTSSeU0EwS10RZKduewdLXhedejrBV Dbwwc8/j0S2fU8yCWfzd1cOMoIor8uYVUh/7ENfry9yUpZYlvzQOmDOolmZtSnXKmAFn UuT7VJgakUlNJrOCtW38+JMFc7QyCLeYjOcFHB2ocj4X5EgMnNPQ6ThkX0ZiLgJcHYe0 NInKeLC0f0n/xPhf56qnoZnB3bMbZstDDdlKdV3Cueu+wwtpJrfercqajdLOGelBj22y dUpft2YPeNv8Ca8v4mDmqO0DNCRAOVbRS9gy5sE9jFL3pF+M35CebqCgbxUbKmikMXzv DIyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="y//VJHjP"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b9si668308eda.115.2019.10.25.00.09.25 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Oct 2019 00:09:25 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="y//VJHjP"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNtit-0006r7-F9 for patch@linaro.org; Fri, 25 Oct 2019 03:09:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37023) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNtN6-00087a-OZ for qemu-devel@nongnu.org; Fri, 25 Oct 2019 02:46:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNtN4-0003Fq-E3 for qemu-devel@nongnu.org; Fri, 25 Oct 2019 02:46:52 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:43713) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iNtN1-0003AN-Kc for qemu-devel@nongnu.org; Fri, 25 Oct 2019 02:46:48 -0400 Received: by mail-wr1-x429.google.com with SMTP id c2so918749wrr.10 for ; Thu, 24 Oct 2019 23:46:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4Fxm3k4cHBOBik3KvWndMPIE/3gLAlHObkdSa6YWSiE=; b=y//VJHjPi8oXoP6/pCX4mtHAdC2aDme2FqibBFdXwCDak2KW5iuftmUI68lfFNlU5P Y0UUxtv0RS+rzCzWbIFkUO17YM4Hspb54IqLYqz4xSKesSBMsAfIT2qddWEW1QphbWQZ hxjUfBUfAGonDKrDhwVis6x4sgqLITPKAUEQuwqPro6rA4zdlF/1zeV8rJuwMXdA/uUM 9kefSIsLm3rFtu51qHmOsGQPr9V+kn3S7NLi3LMeK1UEXM122Uw8ukZYMu7Fce5UiAE/ vjkQsBVPtzaZxEGoBIJg2yxocb3Wg3/4GwJpPP3F6i0gSExt2T75BDcO6fLcmZO5BJjn c3Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4Fxm3k4cHBOBik3KvWndMPIE/3gLAlHObkdSa6YWSiE=; b=i8e0ccQTmAr+iP/gxtsVsv42mg5Sv5JDScHH1lseQGQVckDgCyrKrheh2E5TEjIHQA LAJYAZoAhCBsqW1P4HIvyYuZNU7BOBW1AgqlwEfbWvLlmOsMHVMw0EZJt92Ur9EQG6jf ZUhRJ4KxB/sm6FcOZNUnCiQmklZT0yUBCDmpCcoCyrohqetZPqI5mSI9BTo3593nyR25 OpyJxuh469xBlpYg9LYjuKKkg1ZAeJk0dvFFetFZQS8YBgYn3mQMAqWwb6tM/LnXLFrN /dme6y/3wCvdmgNjJlvzrIZriT95RpNblAI+cDvqyZDqpBGhyj++NgDirSctfMTkO8J1 5Wlg== X-Gm-Message-State: APjAAAXsrzNrnVHe3CBjlgz09d8znYbF2yC7veoUFBTGRbHjnq18vzlw eoKOWdcf+6nhSt9GwjWwlghU6Q== X-Received: by 2002:a5d:6651:: with SMTP id f17mr1353853wrw.175.1571985999073; Thu, 24 Oct 2019 23:46:39 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f17sm1136353wrs.66.2019.10.24.23.46.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 23:46:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5C35C1FFDD; Fri, 25 Oct 2019 07:37:20 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 71/73] scripts/checkpatch.pl: don't complain about (foo, /* empty */) Date: Fri, 25 Oct 2019 07:37:11 +0100 Message-Id: <20191025063713.23374-72-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191025063713.23374-1-alex.bennee@linaro.org> References: <20191025063713.23374-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::429 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aaron Lindsay , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" It's quite common to have a mini comment inside braces to acknowledge we know it's empty. Expand the inline detection to allow closing braces before the end of line. Signed-off-by: Alex Bennée Reviewed-by: Aaron Lindsay -- 2.20.1 diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index aa9a354a0e7..db67b4da872 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1639,7 +1639,7 @@ sub process { # Block comment styles # Block comments use /* on a line of its own - if ($rawline !~ m@^\+.*/\*.*\*/[ \t]*$@ && #inline /*...*/ + if ($rawline !~ m@^\+.*/\*.*\*/[ \t)}]*$@ && #inline /*...*/ $rawline =~ m@^\+.*/\*\*?+[ \t]*[^ \t]@) { # /* or /** non-blank WARN("Block comments use a leading /* on a separate line\n" . $herecurr); }