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 <jpmurphy@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77536
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
diff --git a/src/drivers/crb/tis.c b/src/drivers/crb/tis.c
index a7d4fa7..40a3513 100644
--- a/src/drivers/crb/tis.c
+++ b/src/drivers/crb/tis.c
@@ -122,14 +122,14 @@
{
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 ff1b3a0..75b235e 100644
--- a/src/drivers/i2c/tpm/cr50.c
+++ b/src/drivers/i2c/tpm/cr50.c
@@ -132,7 +132,7 @@
static int process_reset(void)
{
struct stopwatch sw;
- int rv = 0;
+ int rc = 0;
uint8_t access;
/*
@@ -148,9 +148,9 @@
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 @@
return 0;
} while (!stopwatch_expired(&sw));
- if (rv)
+ if (rc)
printk(BIOS_ERR, "Failed to read TPM\n");
else
printk(BIOS_ERR,