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 <tduszyn...@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.


Reply via email to