DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tomasz Duszynski <tduszynski@marvell.com>
To: <dev@dpdk.org>, Thomas Monjalon <thomas@monjalon.net>
Cc: <jerinj@marvell.com>, Tomasz Duszynski <tduszynski@marvell.com>
Subject: [dpdk-dev] [PATCH] devtools: relax headline prefix check
Date: Tue, 27 Jul 2021 08:19:17 -0500	[thread overview]
Message-ID: <20210727131917.120743-1-tduszynski@marvell.com> (raw)

In order to avoid code duplication common code shared across drivers
is stored under drivers/common.

Currently if one needs to introduce changes to common and particular
driver i.e common/driver and net/driver separate patches needs to be
prepared otherwise warning about wrong headline prefix gets printed.

In order to avoid that script should allow cases where changes to
drivers/common/driver and drivers/group/driver belong to the same patch.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
---
 devtools/check-git-log.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh
index 9988bf863d..ee37e65ae4 100755
--- a/devtools/check-git-log.sh
+++ b/devtools/check-git-log.sh
@@ -80,6 +80,10 @@ bad=$(for commit in $commits ; do
 	drv=$(echo "$files" | grep '^drivers/' | cut -d "/" -f 2,3 | sort -u)
 	drvgrp=$(echo "$drv" | cut -d "/" -f 1 | uniq)
 	if [ $(echo "$drvgrp" | wc -l) -gt 1 ] ; then
+		if [ $(echo "$drvgrp" | grep -c "common") -eq 1 ] &&
+		   [ $(echo "$drvgrp" | grep -cv "common") -eq 1 ] ; then
+			continue
+		fi
 		echo "$headline" | grep -v '^drivers:'
 	elif [ $(echo "$drv" | wc -l) -gt 1 ] ; then
 		echo "$headline" | grep -v "^drivers/$drvgrp"
--
2.25.1


             reply	other threads:[~2021-07-27 13:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 13:19 Tomasz Duszynski [this message]
2021-08-06 15:08 ` 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=20210727131917.120743-1-tduszynski@marvell.com \
    --to=tduszynski@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --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).