From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5223545D31; Wed, 27 Nov 2024 01:53:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4BF3A427C8; Wed, 27 Nov 2024 01:53:08 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 2109C427C2 for ; Wed, 27 Nov 2024 01:53:03 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 13F0520545B6; Tue, 26 Nov 2024 16:53:02 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 13F0520545B6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1732668782; bh=uAjlWMqVp2nIxFPT5Zo5R9BDpPXdhP6WfwUTZRbllCY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C7IN4/ANrrIFd/Wso/Q6SzySwQKGNvLptLKiwwrhbXr6DBqL63oulu3L/tnnEtJJF P8OP88fre88hbjDX+BXRPkHAYJlQ23LwpObAj/L+dX2IY8AX1KsipfldAvrJZcfzMt 99f5JvylLWXH26HGn8dhDf3jIiSyb8o/4dHnMuOM= From: Andre Muezerie To: roretzla@linux.microsoft.com Cc: aman.deep.singh@intel.com, anatoly.burakov@intel.com, bruce.richardson@intel.com, byron.marohn@intel.com, conor.walsh@intel.com, cristian.dumitrescu@intel.com, david.hunt@intel.com, dev@dpdk.org, dsosnowski@nvidia.com, gakhil@marvell.com, jerinj@marvell.com, jingjing.wu@intel.com, kirill.rybalchenko@intel.com, konstantin.v.ananyev@yandex.ru, matan@nvidia.com, orika@nvidia.com, radu.nicolau@intel.com, ruifeng.wang@arm.com, sameh.gobriel@intel.com, sivaprasad.tummala@amd.com, skori@marvell.com, stephen@networkplumber.org, suanmingm@nvidia.com, vattunuru@marvell.com, viacheslavo@nvidia.com, vladimir.medvedkin@intel.com, yipeng1.wang@intel.com, Andre Muezerie Subject: [PATCH v6 01/30] devtools: check packed attributes Date: Tue, 26 Nov 2024 16:52:12 -0800 Message-Id: <1732668761-5556-2-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1732668761-5556-1-git-send-email-andremue@linux.microsoft.com> References: <1710968771-16435-1-git-send-email-roretzla@linux.microsoft.com> <1732668761-5556-1-git-send-email-andremue@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Ensure __rte_packed_begin and __rte_packed_end show up in pairs when checking patches. Signed-off-by: Andre Muezerie --- devtools/checkpatches.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index 4a8591be22..d304a84df3 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -362,6 +362,21 @@ check_aligned_attributes() { # return $res } +check_packed_attributes() { # + res=0 + + begin_count=$(grep '__rte_packed_begin' "$1" | \ + wc -l) + end_count=$(grep '__rte_packed_end' "$1" | \ + wc -l) + if [ $begin_count != $end_count ]; then + echo "__rte_packed_begin and __rte_packed_end mismatch. They should always be used in pairs." + res=1 + fi + + return $res +} + check_release_notes() { # rel_notes_prefix=doc/guides/rel_notes/release_ IFS=. read year month release < VERSION @@ -479,6 +494,14 @@ check () { # ret=1 fi + ! $verbose || printf '\nChecking packed attributes:\n' + report=$(check_packed_attributes "$tmpinput") + if [ $? -ne 0 ] ; then + $headline_printed || print_headline "$subject" + printf '%s\n' "$report" + ret=1 + fi + ! $verbose || printf '\nChecking release notes updates:\n' report=$(check_release_notes "$tmpinput") if [ $? -ne 0 ] ; then -- 2.34.1