Merge tpm 2020/05/08 v1
This PR submits a fix that changes improperly used 'FALSE' to 'false'.
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 e91b6ad279f38f231ee9298b6ec2ba0a26a81994:
hw/tpm: fix usage of bool in tpm-tis.c (2020-05-08 15:54:37 -0400)
----------------------------------------------------------------
Stefan Berger (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
[PULL v1 1/1] hw/tpm: fix usage of bool in tpm-tis.c
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
@@ -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 = false;break ; } }
Signature · 1 line
2.24.1
Re: [PULL v1 1/1] hw/tpm: fix usage of bool in tpm-tis.c
Quoted 5 lines · Stefan Berger
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>).
Scratch this one. Wrong author of patch. Need to fix attribution.
Quoted 30 lines
Signed-off-by Jafar Abdi <[email protected]>Reviewed-by Thomas Huth <[email protected]>Reviewed-by Stefan Berger <[email protected]>--- hw/tpm/tpm_tis_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/tpm/tpm_tis_common.c +2
-2@@ -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 = false;break ; } }