Thread (10 messages) 10 messages, 3 authors, 2017-10-25

Re: [PATCH] tpm: Move Linux RNG connection to hwrng

From: PrasannaKumar Muralidharan <hidden>
Date: 2017-10-25 15:25:38
Also in: keyrings, linux-crypto, linux-security-module, lkml

Hi Jason,

On 25 October 2017 at 20:48, Jason Gunthorpe
[off-list ref] wrote:
On Wed, Oct 25, 2017 at 08:15:09PM +0530, PrasannaKumar Muralidharan
wrote:
quoted
quoted
+static int tpm_add_hwrng(struct tpm_chip *chip)
+{
+       if (!IS_ENABLED(CONFIG_HW_RANDOM_TPM))
+               return 0;
Can #ifndef CONFIG_HW_RANDOM_TPM be used instead? That way an if
condition can be avoided.
Generally speaking IS_ENABLED is prefered over #ifdef as it reduces the
set of compilation combinations.
Oh okay. No issues then.

Regards,
PrasannaKumar
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help