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