!1252 add checkpatch check
From: @liaoyu15 Reviewed-by: @Lostwayzxc, @zhang-changzhong Signed-off-by: @zhang-changzhong
This commit is contained in:
commit
b8efa8ac0d
28
kernel.spec
28
kernel.spec
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
Name: kernel
|
Name: kernel
|
||||||
Version: 4.19.90
|
Version: 4.19.90
|
||||||
Release: %{hulkrelease}.0225
|
Release: %{hulkrelease}.0226
|
||||||
Summary: Linux Kernel
|
Summary: Linux Kernel
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: http://www.kernel.org/
|
URL: http://www.kernel.org/
|
||||||
@ -236,6 +236,28 @@ if [ ! -d patches ];then
|
|||||||
mv ../patches .
|
mv ../patches .
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ignores_for_main="CONFIG_DESCRIPTION,FILE_PATH_CHANGES,GERRIT_CHANGE_ID,GIT_COMMIT_ID,UNKNOWN_COMMIT_ID,FROM_SIGN_OFF_MISMATCH,REPEATED_WORD,COMMIT_COMMENT_SYMBOL,BLOCK_COMMENT_STYLE,AVOID_EXTERNS,AVOID_BUG"
|
||||||
|
|
||||||
|
Checkpatches() {
|
||||||
|
local SERIESCONF=$1
|
||||||
|
local PATCH_DIR=$2
|
||||||
|
sed -i '/^#/d' $SERIESCONF
|
||||||
|
sed -i '/^[\s]*$/d' $SERIESCONF
|
||||||
|
|
||||||
|
set +e
|
||||||
|
while IFS= read -r patch; do
|
||||||
|
output=$(scripts/checkpatch.pl --ignore $ignores_for_main $PATCH_DIR/$patch)
|
||||||
|
if echo "$output" | grep -q "ERROR:"; then
|
||||||
|
echo "checkpatch $patch failed"
|
||||||
|
set -e
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
done < "$SERIESCONF"
|
||||||
|
|
||||||
|
set -e
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
Applypatches()
|
Applypatches()
|
||||||
{
|
{
|
||||||
set -e
|
set -e
|
||||||
@ -252,6 +274,7 @@ Applypatches()
|
|||||||
) | sh
|
) | sh
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Checkpatches series.conf %{_builddir}/kernel-%{version}/linux-%{KernelVer}
|
||||||
Applypatches series.conf %{_builddir}/kernel-%{version}/linux-%{KernelVer}
|
Applypatches series.conf %{_builddir}/kernel-%{version}/linux-%{KernelVer}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -807,6 +830,9 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Oct 30 2023 Yu Liao <liaoyu15@huawei.com> - 4.19.90-2310.4.0.0226
|
||||||
|
- Add checkpatch check
|
||||||
|
|
||||||
* Sat Oct 28 2023 YunYi Yang <yangyunyi2@huawei.com> - 4.19.90-2310.4.0.0225
|
* Sat Oct 28 2023 YunYi Yang <yangyunyi2@huawei.com> - 4.19.90-2310.4.0.0225
|
||||||
- config: arm64: Enable config of hisi ptt
|
- config: arm64: Enable config of hisi ptt
|
||||||
- hwtracing: hisi_ptt: Add dummy callback pmu::read()
|
- hwtracing: hisi_ptt: Add dummy callback pmu::read()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user