linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: davem@davemloft.net, sd@queasysnail.net,
	hannes@stressinduktion.org, johannes@sipsolutions.net,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] macsec: fix crypto Kconfig dependency
Date: Mon, 18 Apr 2016 13:07:23 +0200	[thread overview]
Message-ID: <4281377.HK1TLEoJOo@wuerfel> (raw)
In-Reply-To: <20160418104336.GA19175@gondor.apana.org.au>

On Monday 18 April 2016 18:43:36 Herbert Xu wrote:
> 
> It's kind of silly really now that IPv4 selects CRYPTO which
> means that you can't really avoid seeing all those options which
> most users won't care about.

I had not noticed that IPv4 does it, but that is a good point.

We have had a couple of other subsystems with the issue (e.g. MFD),
and have turned around the logic in the end so the user-visible
options are always there and the subsystem core is selected by
all drivers that need it. We could do the same for crypto as below
(untested). I only select CRYPTO from ALGAPI2 there, which may be
wrong if some parts of crypto need the core but do not need algapi,
but it illustrates what we could do.

	Arnd

diff --git a/crypto/Kconfig b/crypto/Kconfig
index 93a1fdc1feee..ed1bc0c49022 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -12,14 +12,12 @@ source "crypto/async_tx/Kconfig"
 #
 # Cryptographic API Configuration
 #
-menuconfig CRYPTO
-	tristate "Cryptographic API"
+config CRYPTO
+	tristate
 	help
 	  This option provides the core Cryptographic API.
 
-if CRYPTO
-
-comment "Crypto core or helper"
+menu "Crypto core or helper"
 
 config CRYPTO_FIPS
 	bool "FIPS 200 compliance"
@@ -39,6 +37,7 @@ config CRYPTO_ALGAPI
 
 config CRYPTO_ALGAPI2
 	tristate
+	select CRYPTO
 
 config CRYPTO_AEAD
 	tristate
@@ -1633,4 +1632,4 @@ source "drivers/crypto/Kconfig"
 source crypto/asymmetric_keys/Kconfig
 source certs/Kconfig
 
-endif	# if CRYPTO
+endmenu

  reply	other threads:[~2016-04-18 11:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-17  9:19 [PATCH] macsec: fix crypto Kconfig dependency Arnd Bergmann
2016-04-17 22:52 ` David Miller
2016-04-18  8:02 ` Herbert Xu
2016-04-18 10:23   ` Arnd Bergmann
2016-04-18 10:43     ` Herbert Xu
2016-04-18 11:07       ` Arnd Bergmann [this message]
2016-04-18 16:43       ` David Miller
2016-04-18 21:44         ` Stephen Rothwell
2016-04-18 16:04   ` David Miller

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=4281377.HK1TLEoJOo@wuerfel \
    --to=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=hannes@stressinduktion.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sd@queasysnail.net \
    /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).