bugfix: tpm2_tis_spi: redeclaration compile error
PATCH 1/1 bugfix: tpm2_tis_spi: redeclaration compile error
tpm2_tis_spi driver fails to compile with errors like this:
drivers/tpm/tpm_tis.h:117:2: error: redeclaration of enumerator 'TPM_ACCESS_VALID' drivers/tpm/tpm_tis.h:118:2: error: redeclaration of enumerator 'TPM_ACCESS_ACTIVE_LOCALITY' drivers/tpm/tpm_tis.h:119:2: error: redeclaration of enumerator 'TPM_ACCESS_REQUEST_PENDING' drivers/tpm/tpm_tis.h:120:2: error: redeclaration of enumerator 'TPM_ACCESS_REQUEST_USE' drivers/tpm/tpm_tis.h:124:2: error: redeclaration of enumerator 'TPM_STS_VALID' drivers/tpm/tpm_tis.h:125:2: error: redeclaration of enumerator 'TPM_STS_COMMAND_READY' drivers/tpm/tpm_tis.h:126:2: error: redeclaration of enumerator 'TPM_STS_GO' drivers/tpm/tpm_tis.h:127:2: error: redeclaration of enumerator 'TPM_STS_DATA_AVAIL' drivers/tpm/tpm_tis.h:128:2: error: redeclaration of enumerator 'TPM_STS_DATA_EXPECT'
This is due to redeclaration of 9 values in tis_access and tis_status enums from tpm_tis.h. Defines are now declared in include/tpm-v2.h, so removing duplicates from tpm_tis.h.
--- drivers/tpm/tpm_tis.h | 15 --------------- 1 file changed, 15 deletions(-)
drivers/tpm/tpm_tis.h +0 -15
@@ -113,19 +113,4 @@ struct tpm_cmd_t {*/ #define MAX_COUNT_LONG 50 -enum tis_access { -TPM_ACCESS_VALID =0x80 , -TPM_ACCESS_ACTIVE_LOCALITY =0x20 , -TPM_ACCESS_REQUEST_PENDING =0x04 , -TPM_ACCESS_REQUEST_USE =0x02 , -}; - -enum tis_status { -TPM_STS_VALID =0x80 , -TPM_STS_COMMAND_READY =0x40 , -TPM_STS_GO =0x20 , -TPM_STS_DATA_AVAIL =0x10 , -TPM_STS_DATA_EXPECT =0x08 , -}; -#endif
base-commit: 04da1cd8076b44ff49a79b7fe048a9e8e56b5f60
Signature · 1 line
2.26.2
PATCH 1/1 bugfix: tpm2_tis_spi: redeclaration compile error
Quoted 12 lines · Bruno Thomsen
tpm2_tis_spidriver fails to compile with errors like this:
drivers/tpm/tpm_tis.h:117:2: error: redeclaration of enumerator 'TPM_ACCESS_VALID'drivers/tpm/tpm_tis.h:118:2: error: redeclaration of enumerator 'TPM_ACCESS_ACTIVE_LOCALITY'drivers/tpm/tpm_tis.h:119:2: error: redeclaration of enumerator 'TPM_ACCESS_REQUEST_PENDING'drivers/tpm/tpm_tis.h:120:2: error: redeclaration of enumerator 'TPM_ACCESS_REQUEST_USE'drivers/tpm/tpm_tis.h:124:2: error: redeclaration of enumerator 'TPM_STS_VALID'drivers/tpm/tpm_tis.h:125:2: error: redeclaration of enumerator 'TPM_STS_COMMAND_READY'drivers/tpm/tpm_tis.h:126:2: error: redeclaration of enumerator 'TPM_STS_GO'drivers/tpm/tpm_tis.h:127:2: error: redeclaration of enumerator 'TPM_STS_DATA_AVAIL'drivers/tpm/tpm_tis.h:128:2: error: redeclaration of enumerator 'TPM_STS_DATA_EXPECT'
Quoted 8 lines
This is due to redeclaration of 9 values in
tis_accessandtis_statusenums fromtpm_tis.h. Defines are now declared ininclude/tpm-v2.h, so removing duplicates fromtpm_tis.h.Signed-off-by Bruno Thomsen <[email protected]>--- drivers/tpm/tpm_tis.h | 15 --------------- 1 file changed, 15 deletions(-)
Doing it this way however breaks tpm1 support. I've taken a different patch for this issue, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200708/4692d581/attachment.sig>