Skip to contentSkip to conversation

Merge tpm 2020/05/08 v3

GIT PULL Applied Stefan Berger 2 participants 3 messages May 12, 2020

lore
Share & tools
lore
#1 lore raw

[PULL v3 1/1] hw/tpm: fix usage of bool in tpm-tis.c

In reply to Stefan Berger

From: Jafar Abdi <[email protected]>

Clean up wrong usage of FALSE and TRUE in places that use "bool" from stdbool.h.

FALSE and TRUE (with capital letters) are the constants defined by glib for being used with the "gboolean" type of glib. But some parts of the code also use TRUE and FALSE for variables that are declared as "bool" (the type from <stdbool.h>).

---
 hw/tpm/tpm_tis_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/tpm/tpm_tis_common.c +2 -2
index 9ce64d4836..1af4bce139 100644
@@ -536,7 +536,7 @@ static void tpm_tis_mmio_write(void *opaque, hwaddr addr,
             while ((TPM_TIS_IS_VALID_LOCTY(s->active_locty) &&
                     locty > s->active_locty) ||
                     !TPM_TIS_IS_VALID_LOCTY(s->active_locty)) {
-                bool higher_seize = FALSE;
+                bool higher_seize = false;
 
                 /* already a pending SEIZE ? */
                 if ((s->loc[locty].access & TPM_TIS_ACCESS_SEIZE)) {
@@ -546,7 +546,7 @@ static void tpm_tis_mmio_write(void *opaque, hwaddr addr,
                 /* check for ongoing seize by a higher locality */
                 for (l = locty + 1; l < TPM_TIS_NUM_LOCALITIES; l++) {
                     if ((s->loc[l].access & TPM_TIS_ACCESS_SEIZE)) {
-                        higher_seize = TRUE;
+                        higher_seize = true;
                         break;
                     }
                 }
Signature · 1 line
2.24.1
#0 lore raw

This PR submits a fix that changes improperly used 'FALSE' to 'false'.

Stefan

The following changes since commit c88f1ffc19e38008a1c33ae039482a860aa7418c:

Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2020-05-08 14:29:18 +0100)

are available in the Git repository at:

git://github.com/stefanberger/qemu-tpm.git tags/pull-tpm-2020-05-08-1

for you to fetch changes up to aadad398e7dc21fe177278498c1be31b8c7d5078:

hw/tpm: fix usage of bool in tpm-tis.c (2020-05-12 11:47:24 -0400)

----------------------------------------------------------------
Jafar Abdi (1):
hw/tpm: fix usage of bool in tpm-tis.c

 hw/tpm/tpm_tis_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.24.1
#2 lore raw
Quoted 13 lines · Stefan Berger

This PR submits a fix that changes improperly used 'FALSE' to 'false'.

Stefan

The following changes since commit c88f1ffc19e38008a1c33ae039482a860aa7418c:

Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2020-05-08 14:29:18 +0100)

are available in the Git repository at:

git://github.com/stefanberger/qemu-tpm.git tags/pull-tpm-2020-05-08-1

Quoted 7 lines

for you to fetch changes up to aadad398e7dc21fe177278498c1be31b8c7d5078:

hw/tpm: fix usage of bool in tpm-tis.c (2020-05-12 11:47:24 -0400)

----------------------------------------------------------------
Jafar Abdi (1):
hw/tpm: fix usage of bool in tpm-tis.c

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.1
for any user-visible changes.

-- PMM