diff options
author | Jon Murphy <jpmurphy@google.com> | 2023-09-05 10:37:05 -0600 |
---|---|---|
committer | Karthik Ramasubramanian <kramasub@google.com> | 2023-09-18 16:20:09 +0000 |
commit | 24604810252c8af7b7f350485f57a646718a5157 (patch) | |
tree | f4a1607df0a43278c5bd7166b02fed36d1affddb /src/drivers | |
parent | 277db94ebbb635f93cce426af2450ad0581485d4 (diff) | |
download | coreboot-24604810252c8af7b7f350485f57a646718a5157.tar.gz coreboot-24604810252c8af7b7f350485f57a646718a5157.tar.bz2 coreboot-24604810252c8af7b7f350485f57a646718a5157.zip |
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>
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/crb/tis.c | 6 | ||||
-rw-r--r-- | src/drivers/i2c/tpm/cr50.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/drivers/crb/tis.c b/src/drivers/crb/tis.c index a7d4fa73473d..40a3513511cd 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 ff1b3a0e3f6e..75b235e1798c 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, |