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 43B2C45BB6 for ; Wed, 23 Oct 2024 23:17:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3937E40261; Wed, 23 Oct 2024 23:17:10 +0200 (CEST) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mails.dpdk.org (Postfix) with ESMTP id 3451D40261 for ; Wed, 23 Oct 2024 23:17:09 +0200 (CEST) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4316e9f4a40so2112635e9.2 for ; Wed, 23 Oct 2024 14:17:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729718229; x=1730323029; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=BfXd0oPvvOUkF8Ow8jaSCx072VbuktnT+374M6oZe2s=; b=HIKockaqtlWorbVCZVgLTouSiSFrC6gDQSLey63ivqgaY5nWttCVHCcSdI6B7IODUB 0b9WEw737BEr044FGCe6+UEQ1B0K8gI3uEHShNzdSynEwCheIUo0Qkv7zS95v6TWD/3v JuqyHgCJmkUWychc0KnwQ06OY9o3yGyd/XXqpXq5ttlhtD7YhQVnoJLp+6q+TRcWhyFY K6K6oBRoo7aYZyjcY0XQVlgzz7Hb1EjbAJP424w9ngPuVS93gULDKaqdkztABmtzbtYR 7xNxxwcTDIfpQ+/Q4Io9SShwk7eeEnWhTpbC101zJCHyMU1wgLPSt+HlrSgEVxUD7a80 kwBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729718229; x=1730323029; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BfXd0oPvvOUkF8Ow8jaSCx072VbuktnT+374M6oZe2s=; b=rJqEkntemo2coqLlq1wuwbuPNImKIvJevxHgHhZE7v02a1WfhbER//91/5Jrrkrb3q Q8epFm8Oai2ZOzYBbjRnd8Z3i2eQcSJ/7Kzr0oLoMpHlLlBmFLVpRZ5prHHamaJIXzIV uJzDEoXxi8361kndmZxXNHNJ+1FOfudFJbAxXZhECFSvzM+8XzN+HgHYxs3oPL/oDArE QqbEOKqktYVW5Y72PrSwqLmmd3l1W0ezac/BtwUspCIPwPL1sooIqTtWXRFWpxU5uwzz rz4rtqlGX9AJx7p3Lej8iUGX42XrX/QF+E7c4aiKElzoe8zGYE5kbB+gNv/WUH3QvBwv nzEg== X-Forwarded-Encrypted: i=1; AJvYcCUlZl21a3loqndg8W4b3+whtbs4FQ6oYAcYATVescVQxa5C92saJnIa7fI/Nneq4bkq3Ju3ORM=@dpdk.org X-Gm-Message-State: AOJu0YwENrq1pSNyP8AZhWXWWl9T2Jvi7Z4LEMQapeX0JIbKyIQt+00P 12RMFPcwVroKgwqAEtomgGwlrDTSJmm2Hwz59cefzxvAhS+1lZFC X-Google-Smtp-Source: AGHT+IGPcnucLBufRVmU5aXqhzZFcyRGp59zF6lFUPKYB1TXdwvjBMC6VIZLL/4v+ItHTwSZsf7uJA== X-Received: by 2002:a05:600c:1d06:b0:430:5356:ac92 with SMTP id 5b1f17b1804b1-43184131feemr32234315e9.7.1729718228497; Wed, 23 Oct 2024 14:17:08 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37ee0b94356sm9778305f8f.67.2024.10.23.14.17.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 14:17:07 -0700 (PDT) From: luca.boccassi@gmail.com To: David Marchand Cc: Thomas Monjalon , dpdk stable Subject: patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 Date: Wed, 23 Oct 2024 22:15:41 +0100 Message-ID: <20241023211704.1216956-1-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/25/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/8a32360685418604a641b1a6c4c281b7a39250aa Thanks. Luca Boccassi --- >From 8a32360685418604a641b1a6c4c281b7a39250aa Mon Sep 17 00:00:00 2001 From: David Marchand Date: Thu, 5 Sep 2024 15:29:09 +0200 Subject: [PATCH] devtools: fix forbidden token check with multiple files [ upstream commit 84cf9b71fc2d6baf1869ef213daee7ec9f8880bc ] If a patch contains multiple files, it is possible to pass through the check because the count of token mentions is not reset between file evaluation. Example with a fake patch: $ cat toto.patch --- a/drivers/plop1 +++ b/drivers/plop1 - RTE_LOG( - RTE_LOG( + RTE_LOG( --- a/drivers/plop2 +++ b/drivers/plop2 + RTE_LOG( $ awk -v FOLDERS='drivers' -v EXPRESSIONS='RTE_LOG\\(' -v MESSAGE='Prefer RTE_LOG_LINE' -f devtools/check-forbidden-tokens.awk toto.patch Besides, the expressions[] array is not used since commit b467d38284b1 ("devtools: add explicit warnings for forbidden tokens"). Fixes: 42f4d724ec27 ("devtools: move awk script ckecking forbidden tokens") Signed-off-by: David Marchand Acked-by: Thomas Monjalon --- devtools/check-forbidden-tokens.awk | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/devtools/check-forbidden-tokens.awk b/devtools/check-forbidden-tokens.awk index 026844141c..2419d3565a 100755 --- a/devtools/check-forbidden-tokens.awk +++ b/devtools/check-forbidden-tokens.awk @@ -32,14 +32,11 @@ BEGIN { for (i in deny_expr) { forbidden_added = "^\\+.*" deny_expr[i]; forbidden_removed="^-.*" deny_expr[i]; - current = expressions[deny_expr[i]] if ($0 ~ forbidden_added) { - count = count + 1; - expressions[deny_expr[i]] = current + 1 + count = count + 1 } if ($0 ~ forbidden_removed) { - count = count - 1; - expressions[deny_expr[i]] = current - 1 + count = count - 1 } } } @@ -49,12 +46,13 @@ BEGIN { } } # switch to next file , check if the balance of add/remove -# of previous filehad new additions +# of previous file had new additions ($0 ~ "^\\+\\+\\+ b/") { in_file = 0; if (count > 0) { exit; } + count = 0 for (i in deny_folders) { re = "^\\+\\+\\+ b/" deny_folders[i]; if ($0 ~ re) { -- 2.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-10-23 22:16:40.603038409 +0100 +++ 0001-devtools-fix-forbidden-token-check-with-multiple-fil.patch 2024-10-23 22:16:40.427939940 +0100 @@ -1 +1 @@ -From 84cf9b71fc2d6baf1869ef213daee7ec9f8880bc Mon Sep 17 00:00:00 2001 +From 8a32360685418604a641b1a6c4c281b7a39250aa Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 84cf9b71fc2d6baf1869ef213daee7ec9f8880bc ] + @@ -38 +40 @@ -index 90d3a64f8e..8d64e99570 100755 +index 026844141c..2419d3565a 100755