On Mon, 20 Jan 2025 19:26:54 +0800
"WanRenyong" <[email protected]> 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'