public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] crypto: atmel: remove bogus select
Date: Thu, 29 Jan 2015 23:24:32 +0100	[thread overview]
Message-ID: <2762861.1qAcXXChEF@wuerfel> (raw)
In-Reply-To: <20150129073328.GC1097@odux.rfo.atmel.com>

On Thursday 29 January 2015 08:33:28 Ludovic Desroches wrote:
> On Wed, Jan 28, 2015 at 09:09:16PM +0100, Arnd Bergmann wrote:
> > The Atmel at91 crypto driver unconditionally selects AT_HDMAC,
> > which results in a Kconfig warning if that driver is not enabled:
> > 
> > warning: (CRYPTO_DEV_ATMEL_AES) selects AT_HDMAC which has unmet direct dependencies (DMADEVICES && ARCH_AT91)
> > 
> > The crypty driver itself does not actually have a dependency
> > on a particular dma engine, other than this being the one that
> > is used in at91.
> > 
> > Removing the 'select' gets rid of the warning, with no apparent
> > downsides.
> 
> This driver doesn't work without DMA. I think it is the reason why the
> select AT_HDMAC was used.
> 

I understand the intention, but this what was written in Kconfig is
not the correct way to express it.

A lot of drivers require DMA_ENGINE support, but the linux/dmaengine.h
header file provides static inline helpers to make sure that things
still compile if that is disabled, and in the example I mentioned
above, it does build, but clearly cannot work as the real dmaengine
interfaces are not provided by the kernel.

What we could do to express the runtime dependency correctly is to add

	depends on (ARCH_AT91 && AT_HDMAC) || COMPILE_TEST

which would let the driver only be enabled in cases that have a
reasonable chance of working, but still allow it to be built
everywhere else.

	Arnd

  reply	other threads:[~2015-01-29 22:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28 20:09 [PATCH] crypto: atmel: remove bogus select Arnd Bergmann
2015-01-29  7:33 ` Ludovic Desroches
2015-01-29 22:24   ` Arnd Bergmann [this message]
2015-02-09 16:16     ` Ludovic Desroches

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=2762861.1qAcXXChEF@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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