linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tpm: rename TPM_TRANSMIT_RAW -> TPM_TRANSMIT_IGNORE_LOCALITY
@ 2018-02-16  8:38 Jarkko Sakkinen
  2018-02-19 12:29 ` Jarkko Sakkinen
  0 siblings, 1 reply; 2+ messages in thread
From: Jarkko Sakkinen @ 2018-02-16  8:38 UTC (permalink / raw)
  To: linux-integrity; +Cc: Jarkko Sakkinen, Peter Huewe, Jason Gunthorpe, open list

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

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
---
 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(-)

diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index 9e80a953d693..b355f9a0307b 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -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)
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index f895fba4e20d..1b7625623a8f 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -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,
diff --git a/drivers/char/tpm/tpm_vtpm_proxy.c b/drivers/char/tpm/tpm_vtpm_proxy.c
index 1d877cc9af97..f36eaf8d57ff 100644
--- a/drivers/char/tpm/tpm_vtpm_proxy.c
+++ b/drivers/char/tpm/tpm_vtpm_proxy.c
@@ -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;
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tpm: rename TPM_TRANSMIT_RAW -> TPM_TRANSMIT_IGNORE_LOCALITY
  2018-02-16  8:38 [PATCH] tpm: rename TPM_TRANSMIT_RAW -> TPM_TRANSMIT_IGNORE_LOCALITY Jarkko Sakkinen
@ 2018-02-19 12:29 ` Jarkko Sakkinen
  0 siblings, 0 replies; 2+ messages in thread
From: Jarkko Sakkinen @ 2018-02-19 12:29 UTC (permalink / raw)
  To: linux-integrity; +Cc: Peter Huewe, Jason Gunthorpe, open list

On Fri, Feb 16, 2018 at 10:38:18AM +0200, Jarkko Sakkinen wrote:
> The previous name does not give any picture of the behaviour.
> 
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> ---
>  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-19 12:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-16  8:38 [PATCH] tpm: rename TPM_TRANSMIT_RAW -> TPM_TRANSMIT_IGNORE_LOCALITY Jarkko Sakkinen
2018-02-19 12:29 ` Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).