Skip to contentSkip to conversation

tpm: rename TPM_TRANSMIT_RAW -> TPM_TRANSMIT_IGNORE_LOCALITY

PATCH In review Jarkko Sakkinen 1 participant 2 messages Feb 16, 2018 – Feb 19, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tpm: rename TPM_TRANSMIT_RAW -> TPM_TRANSMIT_IGNORE_LOCALITY

The previous name does not give any picture of the behaviour.

---
 drivers/char/tpm/tpm-interface.c  | 2 +-
 drivers/char/tpm/tpm.h            | 4 ++--
 drivers/char/tpm/tpm_vtpm_proxy.c | 3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)
drivers/char/tpm/tpm-interface.c +1 -1
index 9e80a953d693..b355f9a0307b 100644
@@ -431,7 +431,7 @@ ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space,
 	/* Store the decision as chip->locality will be changed. */
 	need_locality = chip->locality == -1;
 
-	if (!(flags & TPM_TRANSMIT_RAW) &&
+	if (!(flags & TPM_TRANSMIT_IGNORE_LOCALITY) &&
 	    need_locality && chip->ops->request_locality)  {
 		rc = chip->ops->request_locality(chip, 0);
 		if (rc < 0)
drivers/char/tpm/tpm.h +2 -2
index f895fba4e20d..1b7625623a8f 100644
@@ -499,8 +499,8 @@ extern const struct file_operations tpmrm_fops;
 extern struct idr dev_nums_idr;
 
 enum tpm_transmit_flags {
-	TPM_TRANSMIT_UNLOCKED	= BIT(0),
-	TPM_TRANSMIT_RAW	= BIT(1),
+	TPM_TRANSMIT_UNLOCKED		= BIT(0),
+	TPM_TRANSMIT_IGNORE_LOCALITY	= BIT(1),
 };
 
 ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space,
drivers/char/tpm/tpm_vtpm_proxy.c +2 -1
index 1d877cc9af97..f36eaf8d57ff 100644
@@ -418,7 +418,8 @@ static int vtpm_proxy_request_locality(struct tpm_chip *chip, int locality)
 	proxy_dev->state |= STATE_DRIVER_COMMAND;
 
 	rc = tpm_transmit_cmd(chip, NULL, buf.data, tpm_buf_length(&buf), 0,
-			      TPM_TRANSMIT_UNLOCKED | TPM_TRANSMIT_RAW,
+			      TPM_TRANSMIT_UNLOCKED |
+			      TPM_TRANSMIT_IGNORE_LOCALITY,
 			      "attempting to set locality");
 
 	proxy_dev->state &= ~STATE_DRIVER_COMMAND;
Signature · 1 line
2.14.1
#1 lore raw
Quoted 8 lines · Jarkko Sakkinen

The previous name does not give any picture of the behaviour.

---
 drivers/char/tpm/tpm-interface.c  | 2 +-
 drivers/char/tpm/tpm.h            | 4 ++--
 drivers/char/tpm/tpm_vtpm_proxy.c | 3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)

Are there people who are against of merging this change?

/Jarkko