From 24604810252c8af7b7f350485f57a646718a5157 Mon Sep 17 00:00:00 2001 From: Jon Murphy Date: Tue, 5 Sep 2023 10:37:05 -0600 Subject: drivers/tpm: Make temp test value naming consistent Make naming convention consistent across all functions return values. BUG=b:296439237 TEST=Boot to OS on Skyrim BRANCH=None Change-Id: If86805b39048800276ab90b7687644ec2a0d4bee Signed-off-by: Jon Murphy Reviewed-on: https://review.coreboot.org/c/coreboot/+/77536 Reviewed-by: Yu-Ping Wu Tested-by: build bot (Jenkins) Reviewed-by: Karthik Ramasubramanian Reviewed-by: Eric Lai --- src/drivers/crb/tis.c | 6 +++--- src/drivers/i2c/tpm/cr50.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/drivers') diff --git a/src/drivers/crb/tis.c b/src/drivers/crb/tis.c index a7d4fa7347..40a3513511 100644 --- a/src/drivers/crb/tis.c +++ b/src/drivers/crb/tis.c @@ -122,14 +122,14 @@ static int tpm_get_cap(uint32_t property, uint32_t *value) { TPMS_CAPABILITY_DATA cap_data; int i; - uint32_t status; + uint32_t rc; if (!value) return -1; - status = tlcl_get_capability(TPM_CAP_TPM_PROPERTIES, property, 1, &cap_data); + rc = tlcl_get_capability(TPM_CAP_TPM_PROPERTIES, property, 1, &cap_data); - if (status) + if (rc) return -1; for (i = 0 ; i < cap_data.data.tpmProperties.count; i++) { diff --git a/src/drivers/i2c/tpm/cr50.c b/src/drivers/i2c/tpm/cr50.c index ff1b3a0e3f..75b235e179 100644 --- a/src/drivers/i2c/tpm/cr50.c +++ b/src/drivers/i2c/tpm/cr50.c @@ -132,7 +132,7 @@ static int cr50_i2c_write(uint8_t addr, const uint8_t *buffer, size_t len) static int process_reset(void) { struct stopwatch sw; - int rv = 0; + int rc = 0; uint8_t access; /* @@ -148,9 +148,9 @@ static int process_reset(void) const uint8_t mask = TPM_ACCESS_VALID | TPM_ACCESS_ACTIVE_LOCALITY; - rv = cr50_i2c_read(TPM_ACCESS(0), + rc = cr50_i2c_read(TPM_ACCESS(0), &access, sizeof(access)); - if (rv || ((access & mask) == mask)) { + if (rc || ((access & mask) == mask)) { /* * Don't bombard the chip with traffic, let it keep * processing the command. @@ -165,7 +165,7 @@ static int process_reset(void) return 0; } while (!stopwatch_expired(&sw)); - if (rv) + if (rc) printk(BIOS_ERR, "Failed to read TPM\n"); else printk(BIOS_ERR, -- cgit v1.2.3