DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] devtools: fix filename in forbidden token check
@ 2020-07-06  8:00 David Marchand
  2020-07-06  8:00 ` [dpdk-dev] [PATCH 2/2] devtools: fix forbidden token David Marchand
  2020-07-06  9:50 ` [dpdk-dev] [PATCH 1/2] devtools: fix filename in forbidden token check Arnon Warshavsky
  0 siblings, 2 replies; 4+ messages in thread
From: David Marchand @ 2020-07-06  8:00 UTC (permalink / raw)
  To: dev, thomas; +Cc: stable, Stephen Hemminger, Arnon Warshavsky

Fix displayed filename by adjusting the extraction from the patch.

Before:
Warning in /lib/librte_eal/linux/eal.c:

After:
Warning in lib/librte_eal/linux/eal.c:

Fixes: 7413e7f2aeb3 ("devtools: alert on new calls to exit from libs")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/check-forbidden-tokens.awk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devtools/check-forbidden-tokens.awk b/devtools/check-forbidden-tokens.awk
index 8c89de3d4e..f86cbe8dc1 100755
--- a/devtools/check-forbidden-tokens.awk
+++ b/devtools/check-forbidden-tokens.awk
@@ -62,7 +62,7 @@ BEGIN {
 }
 END {
 	if (count > 0) {
-		print "Warning in " substr(last_file,6) ":"
+		print "Warning in " substr(last_file,7) ":"
 		print MESSAGE
 		exit RET_ON_FAIL
 	}
-- 
2.23.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH 2/2] devtools: fix forbidden token
  2020-07-06  8:00 [dpdk-dev] [PATCH 1/2] devtools: fix filename in forbidden token check David Marchand
@ 2020-07-06  8:00 ` David Marchand
  2020-07-06  8:56   ` Thomas Monjalon
  2020-07-06  9:50 ` [dpdk-dev] [PATCH 1/2] devtools: fix filename in forbidden token check Arnon Warshavsky
  1 sibling, 1 reply; 4+ messages in thread
From: David Marchand @ 2020-07-06  8:00 UTC (permalink / raw)
  To: dev, thomas

An expression with a space is split by the awk script resulting in
false positive for any patch matching any of the two part of the
expression.
Fix this by using [[:space:]].

Fixes: 43e73483a4b8 ("devtools: forbid variable declaration inside for")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/checkpatches.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 27ab1252b7..58021aa5dd 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -71,7 +71,7 @@ check_forbidden_additions() { # <patch>
 
 	# forbid variable declaration inside "for" loop
 	awk -v FOLDERS='.' \
-		-v EXPRESSIONS='for *\\((char|u?int|unsigned|s?size_t)' \
+		-v EXPRESSIONS='for[[:space:]]*\\((char|u?int|unsigned|s?size_t)' \
 		-v RET_ON_FAIL=1 \
 		-v MESSAGE='Declaring a variable inside for()' \
 		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
-- 
2.23.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] devtools: fix forbidden token
  2020-07-06  8:00 ` [dpdk-dev] [PATCH 2/2] devtools: fix forbidden token David Marchand
@ 2020-07-06  8:56   ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2020-07-06  8:56 UTC (permalink / raw)
  To: David Marchand; +Cc: dev

06/07/2020 10:00, David Marchand:
> An expression with a space is split by the awk script resulting in
> false positive for any patch matching any of the two part of the
> expression.
> Fix this by using [[:space:]].
> 
> Fixes: 43e73483a4b8 ("devtools: forbid variable declaration inside for")
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Applied, thanks



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] devtools: fix filename in forbidden token check
  2020-07-06  8:00 [dpdk-dev] [PATCH 1/2] devtools: fix filename in forbidden token check David Marchand
  2020-07-06  8:00 ` [dpdk-dev] [PATCH 2/2] devtools: fix forbidden token David Marchand
@ 2020-07-06  9:50 ` Arnon Warshavsky
  1 sibling, 0 replies; 4+ messages in thread
From: Arnon Warshavsky @ 2020-07-06  9:50 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, Thomas Monjalon, dpdk stable, Stephen Hemminger

On Mon, Jul 6, 2020 at 11:00 AM David Marchand <david.marchand@redhat.com>
wrote:

> Fix displayed filename by adjusting the extraction from the patch.
>
> Before:
> Warning in /lib/librte_eal/linux/eal.c:
>
> After:
> Warning in lib/librte_eal/linux/eal.c:
>
> Fixes: 7413e7f2aeb3 ("devtools: alert on new calls to exit from libs")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  devtools/check-forbidden-tokens.awk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/devtools/check-forbidden-tokens.awk
> b/devtools/check-forbidden-tokens.awk
> index 8c89de3d4e..f86cbe8dc1 100755
> --- a/devtools/check-forbidden-tokens.awk
> +++ b/devtools/check-forbidden-tokens.awk
> @@ -62,7 +62,7 @@ BEGIN {
>  }
>  END {
>         if (count > 0) {
> -               print "Warning in " substr(last_file,6) ":"
> +               print "Warning in " substr(last_file,7) ":"
>                 print MESSAGE
>                 exit RET_ON_FAIL
>         }
> --
> 2.23.0
>
>
Acked-By: Arnon Warshavsky <arnon@qwilt.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-06  9:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06  8:00 [dpdk-dev] [PATCH 1/2] devtools: fix filename in forbidden token check David Marchand
2020-07-06  8:00 ` [dpdk-dev] [PATCH 2/2] devtools: fix forbidden token David Marchand
2020-07-06  8:56   ` Thomas Monjalon
2020-07-06  9:50 ` [dpdk-dev] [PATCH 1/2] devtools: fix filename in forbidden token check Arnon Warshavsky

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git