[PATCH] devtool: fix falsely reporting from checkpatch
Stephen Hemminger
stephen at networkplumber.org
Wed Jul 1 22:46:23 CEST 2026
On Mon, 20 Jan 2025 19:26:54 +0800
"WanRenyong" <wanry at yunsilicon.com> wrote:
> diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
> index 003bb49e04..2e228b7f92 100755
> --- a/devtools/checkpatches.sh
> +++ b/devtools/checkpatches.sh
> @@ -384,8 +384,8 @@ check_packed_attributes() { # <patch>
> res=1
> fi
>
> - begin_count=$(grep '__rte_packed_begin' "$1" | wc -l)
> - end_count=$(grep '__rte_packed_end' "$1" | wc -l)
> + begin_count=$(grep -E '^\+.*__rte_packed_begin' "$1" | wc -l)
> + end_count=$(grep -E '^\+.*__rte_packed_end' "$1" | wc -l)
Using wc to count lines is unnecessary, grep already has a count option '-c'
More information about the dev
mailing list