From b0be9adb9a52d9fc9bccbb27538fdb0c9fb44478 Mon Sep 17 00:00:00 2001 From: David Horstmann Date: Wed, 16 Jul 2025 15:08:58 +0100 Subject: [PATCH 1/2] Allow the tf_psa prefix for functions Allow functions to have the prefix 'tf_psa' in check_names.py. This is needed for new functions added in TF-PSA-Crypto. Signed-off-by: David Horstmann --- scripts/check_names.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check_names.py b/scripts/check_names.py index ef48e2ac9..622077155 100755 --- a/scripts/check_names.py +++ b/scripts/check_names.py @@ -56,7 +56,7 @@ from mbedtls_framework import build_tree PUBLIC_MACRO_PATTERN = r"^(MBEDTLS|PSA|TF_PSA)_[0-9A-Z_]*[0-9A-Z]$" INTERNAL_MACRO_PATTERN = r"^[0-9A-Za-z_]*[0-9A-Z]$" CONSTANTS_PATTERN = PUBLIC_MACRO_PATTERN -IDENTIFIER_PATTERN = r"^(mbedtls|psa)_[0-9a-z_]*[0-9a-z]$" +IDENTIFIER_PATTERN = r"^(mbedtls|psa|tf_psa)_[0-9a-z_]*[0-9a-z]$" class Match(): # pylint: disable=too-few-public-methods """ From f3acf7a2741557d64d70c6965deeea80b8e71941 Mon Sep 17 00:00:00 2001 From: David Horstmann Date: Wed, 16 Jul 2025 16:16:08 +0100 Subject: [PATCH 2/2] Require _crypto part in names Previously we allowed tf_psa_xyz / TF_PSA_XYZ. Change to allow only tf_psa_crypto_xyz / TF_PSA_CRYPTO_XYZ. Signed-off-by: David Horstmann --- scripts/check_names.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/check_names.py b/scripts/check_names.py index 622077155..23ae628fa 100755 --- a/scripts/check_names.py +++ b/scripts/check_names.py @@ -53,10 +53,10 @@ from mbedtls_framework import build_tree # Naming patterns to check against. These are defined outside the NameCheck # class for ease of modification. -PUBLIC_MACRO_PATTERN = r"^(MBEDTLS|PSA|TF_PSA)_[0-9A-Z_]*[0-9A-Z]$" +PUBLIC_MACRO_PATTERN = r"^(MBEDTLS|PSA|TF_PSA_CRYPTO)_[0-9A-Z_]*[0-9A-Z]$" INTERNAL_MACRO_PATTERN = r"^[0-9A-Za-z_]*[0-9A-Z]$" CONSTANTS_PATTERN = PUBLIC_MACRO_PATTERN -IDENTIFIER_PATTERN = r"^(mbedtls|psa|tf_psa)_[0-9a-z_]*[0-9a-z]$" +IDENTIFIER_PATTERN = r"^(mbedtls|psa|tf_psa_crypto)_[0-9a-z_]*[0-9a-z]$" class Match(): # pylint: disable=too-few-public-methods """