DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] devtools: relax headline prefix check
@ 2021-07-27 13:19 Tomasz Duszynski
  2021-08-06 15:08 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Tomasz Duszynski @ 2021-07-27 13:19 UTC (permalink / raw)
  To: dev, Thomas Monjalon; +Cc: jerinj, Tomasz Duszynski

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


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

* Re: [dpdk-dev] [PATCH] devtools: relax headline prefix check
  2021-07-27 13:19 [dpdk-dev] [PATCH] devtools: relax headline prefix check Tomasz Duszynski
@ 2021-08-06 15:08 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2021-08-06 15:08 UTC (permalink / raw)
  To: Tomasz Duszynski; +Cc: dev, jerinj

27/07/2021 15:19, Tomasz Duszynski:
> 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.

No please don't split patches just to make a script happy :)
We can tolerate few warnings if not meaningful.
But I agree it would be better to avoid such wrong warning.

> 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>
[...]
> --- 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

It means you allow one common subdir and exactly one non-common subdir.
I think it is too much restrictive because it makes sense
to change a shared code and several related drivers.

Thanks for working on such improvement.



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

end of thread, other threads:[~2021-08-06 15:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27 13:19 [dpdk-dev] [PATCH] devtools: relax headline prefix check Tomasz Duszynski
2021-08-06 15:08 ` Thomas Monjalon

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).