lkml.org 
[lkml]   [2014]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] DRBG: cleanup of preprocessor macros
Hi Stephan,

On Sat, 28 Jun 2014 22:00:07 +0200 Stephan Mueller <smueller@chronox.de> wrote:
>
> diff --git a/crypto/drbg.c b/crypto/drbg.c
> index 6679a26..03a230e 100644
> --- a/crypto/drbg.c
> +++ b/crypto/drbg.c
> @@ -102,8 +102,13 @@
> #if !defined(CONFIG_CRYPTO_DRBG_HASH) && \
> !defined(CONFIG_CRYPTO_DRBG_HMAC) && \
> !defined(CONFIG_CRYPTO_DRBG_CTR)
> -#warning "The DRBG code is useless without compiling at least one DRBG type"
> -#endif
> +#define CRYPTO_DRBG_NONE_STRING "none "
> +static int __init drbg_init(void)
> +{
> + pr_warn("DRBG: no DRBG core was compiled!\n");
> + return -EFAULT;
> +}
> +#else

Wouldn't this be better handled by Kconfig so that we don't even try to
build this unless one of the required core modules is chosen?

--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-06-29 05:01    [W:0.085 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site