Thread (4 messages) 4 messages, 4 authors, 23d ago

Re: [PATCH] devtool: fix falsely reporting from checkpatch

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2026-07-01 20:46:30

On Mon, 20 Jan 2025 19:26:54 +0800
"WanRenyong" [off-list ref] wrote:
quoted hunk ↗ jump to hunk
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'
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help