Skip to content

Commit 30e2b2c

Browse files
committed
tpm, tpm_tis: correct tpm_tis_flags enumeration values
JIRA: https://issues.redhat.com/browse/RHEL-72765 Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Conflicts: Missing lines due to missing 7bfda9c. commit 4ecd704 Author: Lino Sanfilippo <l.sanfilippo@kunbus.com> Date: Tue May 30 18:41:16 2023 +0200 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 <pavel@denx.de> Fixes: 858e8b7 ("tpm, tpm_tis: Avoid cache incoherency in test for interrupts") Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com> Cc: stable@vger.kernel.org Reviewed-by: Pavel Machek <pavel@denx.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Štěpán Horáček <shoracek@redhat.com>
1 parent 1c183c9 commit 30e2b2c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/char/tpm/tpm_tis_core.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ 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_IRQ_TESTED = BIT(3),
87+
TPM_TIS_ITPM_WORKAROUND = 0,
88+
TPM_TIS_INVALID_STATUS = 1,
89+
TPM_TIS_IRQ_TESTED = 3,
9090
};
9191

9292
struct tpm_tis_data {

0 commit comments

Comments
 (0)