From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 57D99A0350; Thu, 27 Jan 2022 11:55:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D1BE142794; Thu, 27 Jan 2022 11:55:29 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 196D74278B for ; Thu, 27 Jan 2022 11:55:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643280927; 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; bh=qV8/VIa19RNr6d/9tyrRB+Vyvky64xbTfgqkY8g7lH8=; b=eq8hdTbJ6U/SaWTW1H7fsbhPiTT2rf+jmB4Nt9s7bL1r0z3Kfcl4GJj4ice3iPQXSrbgU0 Jy25zPJQRMB8wqunq1C6Q3RUq00ECjHY4vHlfcaAPoW/QSkTCoupEsjxi5uytjc8ffJSzt sAIQSKWga+yDZB/UOFxkCE0x7kx435I= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-410-SWf06ZoaNI2UPI3TV_SKsA-1; Thu, 27 Jan 2022 05:55:23 -0500 X-MC-Unique: SWf06ZoaNI2UPI3TV_SKsA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 00FF61091DA4; Thu, 27 Jan 2022 10:55:22 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.193.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5A9FF7B6E4; Thu, 27 Jan 2022 10:55:20 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: stable@dpdk.org, Thomas Monjalon , Stephen Hemminger , Arnon Warshavsky Subject: [PATCH] devtools: fix comment detection in forbidden token check Date: Thu, 27 Jan 2022 11:55:11 +0100 Message-Id: <20220127105511.4397-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org After a comment section was detected, passing to a new hunk was not seen as ending the section and all subsequent hunks were ignored. Fixes: 7413e7f2aeb3 ("devtools: alert on new calls to exit from libs") Cc: stable@dpdk.org Reported-by: Thomas Monjalon Signed-off-by: David Marchand --- devtools/check-forbidden-tokens.awk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/devtools/check-forbidden-tokens.awk b/devtools/check-forbidden-tokens.awk index 61ba707c9b..026844141c 100755 --- a/devtools/check-forbidden-tokens.awk +++ b/devtools/check-forbidden-tokens.awk @@ -20,6 +20,9 @@ BEGIN { # state machine assumes the comments structure is enforced by # checkpatches.pl (in_file) { + if ($0 ~ "^@@") { + in_comment = 0 + } # comment start if (index($0,comment_start) > 0) { in_comment = 1 -- 2.23.0