qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 50/63] tpm_crb: Rename CRB to TPM_CRB


From: Stefan Berger
Subject: Re: [PATCH 50/63] tpm_crb: Rename CRB to TPM_CRB
Date: Thu, 3 Sep 2020 19:38:48 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 9/2/20 6:42 PM, Eduardo Habkost wrote:
Make the type checking macro name consistent with the TYPE_*
constant.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>




---
Cc: Stefan Berger <stefanb@linux.ibm.com>
Cc: qemu-devel@nongnu.org
---
  hw/tpm/tpm_crb.c | 14 +++++++-------
  1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
index aa9c00aad3..f4e3f0abbc 100644
--- a/hw/tpm/tpm_crb.c
+++ b/hw/tpm/tpm_crb.c
@@ -47,7 +47,7 @@ struct CRBState {
  };
  typedef struct CRBState CRBState;
-DECLARE_INSTANCE_CHECKER(CRBState, CRB,
+DECLARE_INSTANCE_CHECKER(CRBState, TPM_CRB,
                           TYPE_TPM_CRB)
#define CRB_INTF_TYPE_CRB_ACTIVE 0b1
@@ -86,7 +86,7 @@ enum crb_cancel {
  static uint64_t tpm_crb_mmio_read(void *opaque, hwaddr addr,
                                    unsigned size)
  {
-    CRBState *s = CRB(opaque);
+    CRBState *s = TPM_CRB(opaque);
      void *regs = (void *)&s->regs + (addr & ~3);
      unsigned offset = addr & 3;
      uint32_t val = *(uint32_t *)regs >> (8 * offset);
@@ -113,7 +113,7 @@ static uint8_t tpm_crb_get_active_locty(CRBState *s)
  static void tpm_crb_mmio_write(void *opaque, hwaddr addr,
                                 uint64_t val, unsigned size)
  {
-    CRBState *s = CRB(opaque);
+    CRBState *s = TPM_CRB(opaque);
      uint8_t locty =  addr >> 12;
trace_tpm_crb_mmio_write(addr, size, val);
@@ -190,7 +190,7 @@ static const MemoryRegionOps tpm_crb_memory_ops = {
static void tpm_crb_request_completed(TPMIf *ti, int ret)
  {
-    CRBState *s = CRB(ti);
+    CRBState *s = TPM_CRB(ti);
s->regs[R_CRB_CTRL_START] &= ~CRB_START_INVOKE;
      if (ret != 0) {
@@ -201,7 +201,7 @@ static void tpm_crb_request_completed(TPMIf *ti, int ret)
static enum TPMVersion tpm_crb_get_version(TPMIf *ti)
  {
-    CRBState *s = CRB(ti);
+    CRBState *s = TPM_CRB(ti);
return tpm_backend_get_tpm_version(s->tpmbe);
  }
@@ -232,7 +232,7 @@ static Property tpm_crb_properties[] = {
static void tpm_crb_reset(void *dev)
  {
-    CRBState *s = CRB(dev);
+    CRBState *s = TPM_CRB(dev);
if (s->ppi_enabled) {
          tpm_ppi_reset(&s->ppi);
@@ -281,7 +281,7 @@ static void tpm_crb_reset(void *dev)
static void tpm_crb_realize(DeviceState *dev, Error **errp)
  {
-    CRBState *s = CRB(dev);
+    CRBState *s = TPM_CRB(dev);
if (!tpm_find()) {
          error_setg(errp, "at most one TPM device is permitted");





reply via email to

[Prev in Thread] Current Thread [Next in Thread]