Skip to content

tpm: Attempt to return value not in enum

Andrew Goodbody u-boot 3 versions – In review

Get series with b4
b4 am [email protected] change-id 20250625-tpm_enum-098ee9a5eb6b

Versions newest first

  1. v3 Latest2 patches 1 replyIn review
  2. v22 patches 3 repliesSuperseded
  3. v11 patch 1 replySuperseded

Changes in v3 from the cover letter

- Rework first patch to have the header file include errno.h instead of the individual files
- Link to v2: https://lore.kernel.org/r/[email protected]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2cmd: tpm: Fix attempt to return value not in enuminclude/tpm-v2.h+2 -01 reply
2/2tpm: Make use of TPM2_ALG_INVAL from enumcmd/tpm-v2.c lib/tpm-v2.c+4 -40 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchIlias Apalodimas
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] tpm: Attempt to return value not in enum

The function tpm2_name_to_algorithm attempts to return -EINVAL for an error but that is not included in the enum tpm2_algorithms which is defined as the return type for this function. Add -EINVAL as TPM2_ALG_INVAL to the enum so that it can be returned as desired. Update the code to use this enum value.

---
Changes in v3:
- Rework first patch to have the header file include errno.h instead of the individual files
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Add patch to make use of new enum value TPM2_ALG_INVAL
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Andrew Goodbody (2):
cmd: tpm: Fix attempt to return value not in enum
tpm: Make use of TPM2_ALG_INVAL from enum

 cmd/tpm-v2.c     | 6 +++---
 include/tpm-v2.h | 2 ++
 lib/tpm-v2.c     | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

---
base-commit: 903eb123236ccbd8ef05d43507a2a910b785bd56
change-id: 20250625-tpm_enum-098ee9a5eb6b

Best regards,

Signature · 1 line
Andrew Goodbody <[email protected]>