mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stuart Yoder <stuart.yoder@arm.com>
To: Jarkko Sakkinen <jarkko@kernel.org>
Cc: linux-integrity@vger.kernel.org, peterhuewe@gmx.de, jgg@ziepe.ca,
	sudeep.holla@arm.com, rafael@kernel.org, lenb@kernel.org,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/5] tpm_crb: refactor check for idle support into TPM into inline function
Date: Thu, 13 Feb 2025 16:23:58 -0600	[thread overview]
Message-ID: <291d5cbe-428c-4361-ba14-f1d3a01d1ce6@arm.com> (raw)
In-Reply-To: <Z65umt3_lzAgXbJX@kernel.org>



On 2/13/25 4:13 PM, Jarkko Sakkinen wrote:
> On Wed, Feb 12, 2025 at 04:05:45PM -0600, Stuart Yoder wrote:
>> Refactor the two checks for whether the TPM supports idle into a single
>> inline function.
>>
>> Signed-off-by: Stuart Yoder <stuart.yoder@arm.com>
>> ---
>>   drivers/char/tpm/tpm_crb.c | 18 ++++++++++++------
>>   1 file changed, 12 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
>> index ea085b14ab7c..87d69e990249 100644
>> --- a/drivers/char/tpm/tpm_crb.c
>> +++ b/drivers/char/tpm/tpm_crb.c
>> @@ -115,6 +115,16 @@ struct tpm2_crb_pluton {
>>   	u64 reply_addr;
>>   };
>>   
>> +static inline bool does_tpm_support_idle(u32 start_method)
>> +{
>> +	if ((start_method == ACPI_TPM2_START_METHOD) ||
>> +	    (start_method == ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD) ||
>> +	    (start_method == ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC))
>> +		return false;
>> +	else
>> +		return true;
>> +}
>> +
> 
> I think we could also prefix tpm_crb stuff with tpm_crb_* for the sake
> of easier grepping etc.
> 
> So I'd propose this to be called as: tpm_crb_has_idle()

Ack.

Stuart

  reply	other threads:[~2025-02-13 22:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12 22:05 [PATCH v2 0/5] Add support for the TPM FF-A start method Stuart Yoder
2025-02-12 22:05 ` [PATCH v2 1/5] tpm_crb: implement driver compliant to CRB over FF-A Stuart Yoder
2025-02-13 22:14   ` Jarkko Sakkinen
2025-02-13 22:22     ` Stuart Yoder
2025-02-13 23:37       ` Jarkko Sakkinen
2025-02-16  0:28   ` kernel test robot
2025-02-12 22:05 ` [PATCH v2 2/5] tpm_crb: refactor check for idle support into TPM into inline function Stuart Yoder
2025-02-13 22:13   ` Jarkko Sakkinen
2025-02-13 22:23     ` Stuart Yoder [this message]
2025-02-12 22:05 ` [PATCH v2 3/5] ACPICA: add start method for Arm FF-A Stuart Yoder
2025-02-12 22:05 ` [PATCH v2 4/5] tpm_crb: add support for the Arm FF-A start method Stuart Yoder
2025-02-12 22:05 ` [PATCH v2 5/5] Documentation: tpm: add documentation for the CRB FF-A interface Stuart Yoder
2025-02-13 22:11   ` Jarkko Sakkinen
2025-02-13 22:17     ` Stuart Yoder
2025-02-13 23:38       ` Jarkko Sakkinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=291d5cbe-428c-4361-ba14-f1d3a01d1ce6@arm.com \
    --to=stuart.yoder@arm.com \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=rafael@kernel.org \
    --cc=sudeep.holla@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®