From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: David Marchand <david.marchand@redhat.com>,
Haiyue Wang <haiyue.wang@intel.com>,
stable@dpdk.org
Subject: [PATCH] devtools: fix regex matching literal plus in patches
Date: Tue, 5 May 2026 16:03:52 +0200 [thread overview]
Message-ID: <20260505140352.3995590-1-thomas@monjalon.net> (raw)
In Extended Regular Expressions (ERE) as used in awk,
'+' is a quantifier, not a literal character.
The pattern /^+/ matches the start of any line
instead of only lines beginning with a literal '+'.
As a result, check_experimental_tags and check_internal_tags
were matching context and removed lines in diffs, causing false positives.
Use [+] character class to unambiguously match a literal '+'.
Fixes: cfe3aeb170b2 ("remove experimental tags from all symbol definitions")
Fixes: fba5af82adc8 ("eal: add internal ABI tag definition")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
devtools/checkpatches.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 1c6099ac82..f5dd77443f 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -321,10 +321,10 @@ check_experimental_tags() { # <patch>
current_file = "";
ret = 0;
}
- /^+++ b\// {
+ /^[+][+][+] b\// {
current_file = $2;
}
- /^+.*__rte_experimental/ {
+ /^[+].*__rte_experimental/ {
if (current_file ~ ".c$" ) {
print "Please only put __rte_experimental tags in " \
"headers ("current_file")";
@@ -351,10 +351,10 @@ check_internal_tags() { # <patch>
current_file = "";
ret = 0;
}
- /^+++ b\// {
+ /^[+][+][+] b\// {
current_file = $2;
}
- /^+.*__rte_internal/ {
+ /^[+].*__rte_internal/ {
if (current_file ~ ".c$" ) {
print "Please only put __rte_internal tags in " \
"headers ("current_file")";
--
2.54.0
next reply other threads:[~2026-05-05 14:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 14:03 Thomas Monjalon [this message]
2026-05-18 11:55 ` [PATCH] devtools: fix regex matching literal plus in patches David Marchand
2026-05-18 13:18 ` 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=20260505140352.3995590-1-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=haiyue.wang@intel.com \
--cc=stable@dpdk.org \
/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