Skip to content

[zep fromlist] psa_crypto.c: Fix ifdefs to avoid build warning#2

Merged
valeriosetti merged 1 commit into
zephyrproject-rtos:zephyr_tf-psa-crypto_v1.1.0from
aescolar:hotfix_clang
Mar 21, 2026
Merged

[zep fromlist] psa_crypto.c: Fix ifdefs to avoid build warning#2
valeriosetti merged 1 commit into
zephyrproject-rtos:zephyr_tf-psa-crypto_v1.1.0from
aescolar:hotfix_clang

Conversation

@aescolar
Copy link
Copy Markdown
Member

@aescolar aescolar commented Mar 21, 2026

Add a couple of missing ifdefs to avoid having unreachable code with AT_LEAST_ONE_BUILTIN_KDF not defined, which otherwise causes a build warning with clang.

Issue seen in Zephyr CI's clang workflow:
https://github.com/zephyrproject-rtos/zephyr/actions/runs/23368380259/job/67987251166

More details in Zephyr PR:

Upstream PR:

Copy link
Copy Markdown
Collaborator

@valeriosetti valeriosetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not against the change, but why is this a [zep noup]?
This change doesn't seem to be Zephyr specific so there must be an upstream PR ported here. A PR of mine on this repo has been nacked just a few days ago for the very same reason.
Please open an upstream PR with this change and add it here with git cherry-pick -x (here's the guideline).

Add a couple of missing ifdefs to avoid having unreachable code with
AT_LEAST_ONE_BUILTIN_KDF not defined, which otherwise causes a build
warning with clang.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>

Upstream PR #: 723
@aescolar aescolar changed the title [zep noup] psa_crypto.c: Fix ifdefs to avoid build warning [zep fromlist] psa_crypto.c: Fix ifdefs to avoid build warning Mar 21, 2026
@aescolar
Copy link
Copy Markdown
Member Author

aescolar commented Mar 21, 2026

Thanks @valeriosetti I created the PR upstream Mbed-TLS#723 and changed this to be a fromlist.
You are more than welcome to take over this PR and/or the upstream one and fix anything however you think it is best. You can of course also advice on how to fix things, but you are much more knowledgable about this areas and this module upstream contribution process, and from my POV, my interest is limited on stabilizing Zephyr's main.

If contributing in an appropriate way to this modules branch is too complex/lengthy, another option would be to merge this as a zephyr_2026_03_21 hotfix branch, and handle the fix into the zephyr_tf-psa-crypto_v1.1.0 branch calmly after.

@fabiobaltieri
Copy link
Copy Markdown
Member

fabiobaltieri commented Mar 21, 2026

For other repos in the org divergence are kept in branches that match the main repo release branch name, so for example this could go on a v4.3-branch and then v4.4-branch as well I guess and when v4.5 happens that branch could be rebase to drop the commits that have been upstreamed, though I don't see a main tracking branch in https://github.com/zephyrproject-rtos/TF-PSA-Crypto? But yeah I think it'd be nice to stay away from arbitrary branch name for fixes.

@valeriosetti valeriosetti self-requested a review March 21, 2026 12:59
Copy link
Copy Markdown
Collaborator

@valeriosetti valeriosetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening the upstream PR and adjusting this one. LGTM now :)

@valeriosetti
Copy link
Copy Markdown
Collaborator

You are more than welcome to take over this PR and/or the upstream one and fix anything however you think it is best

@aescolar I already added myself as reviewer for the upstream PR and I'll take care of bringing that one forward

@valeriosetti valeriosetti merged commit 6820f1d into zephyrproject-rtos:zephyr_tf-psa-crypto_v1.1.0 Mar 21, 2026
@valeriosetti
Copy link
Copy Markdown
Collaborator

For other repos in the org divergence are kept in branches that match the main repo release branch name, so for example this could go on a v4.3-branch and then v4.4-branch as well I guess and when v4.5 happens that branch could be rebase to drop the commits that have been upstreamed, though I don't see a main tracking branch in https://github.com/zephyrproject-rtos/TF-PSA-Crypto? But yeah I think it'd be nice to stay away from arbitrary branch name for fixes.

Here we're following the bumping guidelines described in Mbed TLS's README file where we track the upstream project lifecycle instead of the Zephyr one. The branch where this PR is merged is zephyr_tf-psa-crypto_v1.1.0 which corresponds to zephyr_<module_name>_<release_numbers>.
This procedure was introduced last year and it's now adopted by a variety of repos in Zephyr:

@fabiobaltieri
Copy link
Copy Markdown
Member

Cool, sounds like you have your plan together, thanks for clarifying.

@aescolar aescolar deleted the hotfix_clang branch March 21, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants