From: Guenter Roeck <linux@roeck-us.net>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: Peter Huewe <peterhuewe@gmx.de>,
Jarkko Sakkinen <jarkko@kernel.org>,
Jason Gunthorpe <jgg@ziepe.ca>,
Dominik Brodowski <linux@dominikbrodowski.net>,
Herbert Xu <herbert@gondor.apana.org.au>,
stable@vger.kernel.org,
Thorsten Leemhuis <regressions@leemhuis.info>,
James Bottomley <James.Bottomley@hansenpartnership.com>,
"Jason A . Donenfeld" <Jason@zx2c4.com>,
linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] tpm: disable hwrng for fTPM on some AMD designs
Date: Mon, 27 Feb 2023 07:06:21 -0800 [thread overview]
Message-ID: <3ed3054d-0ede-4557-4590-a01861c338e3@roeck-us.net> (raw)
In-Reply-To: <7f5bd6a2-2eed-a27e-8655-181bb37a7c1c@amd.com>
On 2/27/23 06:58, Mario Limonciello wrote:
[ ... ]
>>> + version = ((u64)val1 << 32) | val2;
>>> + if ((version >> 48) == 6) {
>>> + if (version >= 0x0006000000180006ULL)
>>> + return false;
>>> + } else if ((version >> 48) == 3) {
>>> + if (version >= 0x0003005700000005ULL)
>>> + return false;
>>> + } else
>>> + return false;
>>
>> checkpatch:
>>
>> CHECK: braces {} should be used on all arms of this statement
>> #200: FILE: drivers/char/tpm/tpm-chip.c:557:
>> + if ((version >> 48) == 6) {
>> [...]
>> + } else if ((version >> 48) == 3) {
>> [...]
>> + } else
>> [...]
>
> It was requested by Jarko explicitly in v1 to do it this way.
>
> https://lore.kernel.org/lkml/Y+%2F6G+UlTI7GpW6o@kernel.org/
>
Interesting. We live and learn.
Guenter
next prev parent reply other threads:[~2023-02-27 15:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 18:07 [PATCH v2] tpm: disable hwrng for fTPM on some AMD designs Mario Limonciello
2023-02-27 14:52 ` Mario Limonciello
2023-02-28 2:37 ` Limonciello, Mario
2023-02-28 2:41 ` Jarkko Sakkinen
2023-02-27 14:55 ` Guenter Roeck
2023-02-27 14:58 ` Mario Limonciello
2023-02-27 15:06 ` Guenter Roeck [this message]
2023-02-28 2:39 ` 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=3ed3054d-0ede-4557-4590-a01861c338e3@roeck-us.net \
--to=linux@roeck-us.net \
--cc=James.Bottomley@hansenpartnership.com \
--cc=Jason@zx2c4.com \
--cc=herbert@gondor.apana.org.au \
--cc=jarkko@kernel.org \
--cc=jgg@ziepe.ca \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=mario.limonciello@amd.com \
--cc=peterhuewe@gmx.de \
--cc=regressions@leemhuis.info \
--cc=stable@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).