All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL v1 0/1] Merge tpm 2020/05/08 v1
@ 2020-05-08 20:04 Stefan Berger
  2020-05-08 20:04 ` [PULL v1 1/1] hw/tpm: fix usage of bool in tpm-tis.c Stefan Berger
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Berger @ 2020-05-08 20:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Stefan Berger

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(-)

-- 
2.24.1



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

* [PULL v1 1/1] hw/tpm: fix usage of bool in tpm-tis.c
  2020-05-08 20:04 [PULL v1 0/1] Merge tpm 2020/05/08 v1 Stefan Berger
@ 2020-05-08 20:04 ` Stefan Berger
  2020-05-08 20:34   ` Stefan Berger
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Berger @ 2020-05-08 20:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Thomas Huth, Stefan Berger, Jafar Abdi, 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>).

Signed-off-by: Jafar Abdi <cafer.abdi@gmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
---
 hw/tpm/tpm_tis_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/tpm/tpm_tis_common.c b/hw/tpm/tpm_tis_common.c
index 9ce64d4836..5cd4006d2f 100644
--- a/hw/tpm/tpm_tis_common.c
+++ b/hw/tpm/tpm_tis_common.c
@@ -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;
                     }
                 }
-- 
2.24.1



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

* Re: [PULL v1 1/1] hw/tpm: fix usage of bool in tpm-tis.c
  2020-05-08 20:04 ` [PULL v1 1/1] hw/tpm: fix usage of bool in tpm-tis.c Stefan Berger
@ 2020-05-08 20:34   ` Stefan Berger
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Berger @ 2020-05-08 20:34 UTC (permalink / raw)
  To: Stefan Berger, qemu-devel; +Cc: peter.maydell, Thomas Huth, Jafar Abdi

On 5/8/20 4:04 PM, Stefan Berger wrote:
> 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.


>
> Signed-off-by: Jafar Abdi <cafer.abdi@gmail.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
> ---
>   hw/tpm/tpm_tis_common.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/tpm/tpm_tis_common.c b/hw/tpm/tpm_tis_common.c
> index 9ce64d4836..5cd4006d2f 100644
> --- a/hw/tpm/tpm_tis_common.c
> +++ b/hw/tpm/tpm_tis_common.c
> @@ -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;
>                       }
>                   }




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

end of thread, other threads:[~2020-05-08 20:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 20:04 [PULL v1 0/1] Merge tpm 2020/05/08 v1 Stefan Berger
2020-05-08 20:04 ` [PULL v1 1/1] hw/tpm: fix usage of bool in tpm-tis.c Stefan Berger
2020-05-08 20:34   ` Stefan Berger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.