DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Arnon Warshavsky <arnon@qwilt.com>
Subject: [PATCH] devtools: fix comment detection in forbidden token check
Date: Thu, 27 Jan 2022 11:55:11 +0100	[thread overview]
Message-ID: <20220127105511.4397-1-david.marchand@redhat.com> (raw)

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 <thomas@monjalon.net>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 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


             reply	other threads:[~2022-01-27 10:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27 10:55 David Marchand [this message]
2022-01-27 16:20 ` Thomas Monjalon

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=20220127105511.4397-1-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=arnon@qwilt.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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).