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 A77F445F25; Mon, 23 Dec 2024 20:12:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 93309402DC; Mon, 23 Dec 2024 20:12:16 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id D3D5E40263 for ; Mon, 23 Dec 2024 20:12:14 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 2419F206ADCF; Mon, 23 Dec 2024 11:12:14 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2419F206ADCF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1734981134; bh=M1FabPoc7MKEku7KV3/3YfcoH/2/YrEShHRVKm+snTA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N8e9neMa6+Ja7Vdq7qKXMoY/IG8RL+sp0gJExoB4NcFOS7R5TkADguIivuQhf4oAV lWCnftFEjBbgPQZpU/51fOE+aeM5bjEXReEviazWrFRCcyBtTrDrMCnJFfQ4ut4nPc Q2f3T0sLjuqjWWnUSLP+Ls+SSsTLTbCXQJbdDlwU= 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 v7 01/29] devtools: check packed attributes Date: Mon, 23 Dec 2024 11:11:34 -0800 Message-Id: <1734981122-4729-2-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1734981122-4729-1-git-send-email-andremue@linux.microsoft.com> References: <1710968771-16435-1-git-send-email-roretzla@linux.microsoft.com> <1734981122-4729-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 Acked-by: Tyler Retzlaff --- 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.47.0.vfs.0.3