Skip to content

Commit 4ecd704

Browse files
linosanfilippo-kunbustorvalds
authored andcommitted
tpm, tpm_tis: correct tpm_tis_flags enumeration values
With commit 858e8b7 ("tpm, tpm_tis: Avoid cache incoherency in test for interrupts") bit accessor functions are used to access flags in tpm_tis_data->flags. However these functions expect bit numbers, while the flags are defined as bit masks in enum tpm_tis_flag. Fix this inconsistency by using numbers instead of masks also for the flags in the enum. Reported-by: Pavel Machek <[email protected]> Fixes: 858e8b7 ("tpm, tpm_tis: Avoid cache incoherency in test for interrupts") Signed-off-by: Lino Sanfilippo <[email protected]> Cc: [email protected] Reviewed-by: Pavel Machek <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 6d7d060 commit 4ecd704

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/char/tpm/tpm_tis_core.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ enum tis_defaults {
8484
#define ILB_REMAP_SIZE 0x100
8585

8686
enum tpm_tis_flags {
87-
TPM_TIS_ITPM_WORKAROUND = BIT(0),
88-
TPM_TIS_INVALID_STATUS = BIT(1),
89-
TPM_TIS_DEFAULT_CANCELLATION = BIT(2),
90-
TPM_TIS_IRQ_TESTED = BIT(3),
87+
TPM_TIS_ITPM_WORKAROUND = 0,
88+
TPM_TIS_INVALID_STATUS = 1,
89+
TPM_TIS_DEFAULT_CANCELLATION = 2,
90+
TPM_TIS_IRQ_TESTED = 3,
9191
};
9292

9393
struct tpm_tis_data {

0 commit comments

Comments
 (0)