[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230530164116.20770-1-LinoSanfilippo@gmx.de>
Date: Tue, 30 May 2023 18:41:16 +0200
From: Lino Sanfilippo <LinoSanfilippo@....de>
To: jarkko@...nel.org, gregkh@...uxfoundation.org, pavel@...x.de
Cc: linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, linux@...ck-us.net, shuah@...nel.org,
patches@...nelci.org, lkft-triage@...ts.linaro.org,
jonathanh@...dia.com, f.fainelli@...il.com,
sudipm.mukherjee@...il.com, srw@...dewatkins.net, rwarsow@....de,
linux-integrity@...r.kernel.org, l.sanfilippo@...bus.com,
lukas@...ner.de, p.rosenberger@...bus.com, stable@...r.kernel.org
Subject: [PATCH] tpm, tpm_tis: correct tpm_tis_flags enumeration values
From: Lino Sanfilippo <l.sanfilippo@...bus.com>
With commit 858e8b792d06 ("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@...x.de>
Fixes: 858e8b792d06 ("tpm, tpm_tis: Avoid cache incoherency in test for interrupts")
Signed-off-by: Lino Sanfilippo <l.sanfilippo@...bus.com>
Cc: stable@...r.kernel.org
---
drivers/char/tpm/tpm_tis_core.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/char/tpm/tpm_tis_core.h b/drivers/char/tpm/tpm_tis_core.h
index e978f457fd4d..610bfadb6acf 100644
--- a/drivers/char/tpm/tpm_tis_core.h
+++ b/drivers/char/tpm/tpm_tis_core.h
@@ -84,10 +84,10 @@ enum tis_defaults {
#define ILB_REMAP_SIZE 0x100
enum tpm_tis_flags {
- TPM_TIS_ITPM_WORKAROUND = BIT(0),
- TPM_TIS_INVALID_STATUS = BIT(1),
- TPM_TIS_DEFAULT_CANCELLATION = BIT(2),
- TPM_TIS_IRQ_TESTED = BIT(3),
+ TPM_TIS_ITPM_WORKAROUND = 0,
+ TPM_TIS_INVALID_STATUS = 1,
+ TPM_TIS_DEFAULT_CANCELLATION = 2,
+ TPM_TIS_IRQ_TESTED = 3,
};
struct tpm_tis_data {
base-commit: 7877cb91f1081754a1487c144d85dc0d2e2e7fc4
--
2.40.1
Powered by blists - more mailing lists