mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] tpm, tpm_tis: correct tpm_tis_flags enumeration values
@ 2023-05-30 16:41 Lino Sanfilippo
  2023-06-02 19:21 ` Pavel Machek
  0 siblings, 1 reply; 2+ messages in thread
From: Lino Sanfilippo @ 2023-05-30 16:41 UTC (permalink / raw)
  To: jarkko, gregkh, pavel
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches, lkft-triage,
	jonathanh, f.fainelli, sudipm.mukherjee, srw, rwarsow,
	linux-integrity, l.sanfilippo, lukas, p.rosenberger, stable

From: Lino Sanfilippo <l.sanfilippo@kunbus.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@denx.de>
Fixes: 858e8b792d06 ("tpm, tpm_tis: Avoid cache incoherency in test for interrupts")
Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com>
Cc: stable@vger.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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-02 19:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-30 16:41 [PATCH] tpm, tpm_tis: correct tpm_tis_flags enumeration values Lino Sanfilippo
2023-06-02 19:21 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®