lkml.org 
[lkml]   [2017]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] tpm: Move Linux RNG connection to hwrng
    On Wed, Oct 25, 2017 at 08:15:09PM +0530, PrasannaKumar Muralidharan wrote:
    > > + 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.

    Nope. There is no reason to avoid the if-condition. Compiler will take
    care of it. IS_ENABLED() macro is available just for the purpose Jason
    is using it.

    > > + char tpm_hwrng_name[64];
    > > + struct hwrng tpm_hwrng;
    > > +
    >
    > Can this also be put inside the #ifdef?

    Yes. It should be inside #ifdef.

    /Jarkko

    \
     
     \ /
      Last update: 2017-10-25 20:59    [W:5.020 / U:0.732 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site