All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Joe Perches <joe@perches.com>,
	"David S. Miller" <davem@davemloft.net>,
	"open list:HARDWARE RANDOM NUMBER GENERATOR CORE" 
	<linux-crypto@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [possible PATCH] crypto: sahara - Use #ifdef DEBUG not IS_ENABLED(DEBUG)
Date: Fri, 22 Mar 2019 15:29:59 +0100	[thread overview]
Message-ID: <CAKv+Gu_SBkhV8SVXpOBDoPRBJYhFdmF3jJdZ5OPm3SrPBTSarQ@mail.gmail.com> (raw)
In-Reply-To: <20190322124331.s5iu4ontsakv7he5@gondor.apana.org.au>

On Fri, 22 Mar 2019 at 13:43, Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Thu, Mar 07, 2019 at 04:15:55PM -0800, Joe Perches wrote:
> > Normal use of IS_ENABLED is with a CONFIG_<SYMBOL> and
> > there is no -DDEBUG in the Makefile here.
> >
> > Replace the IS_ENABLED(DEBUG) with #ifdef DEBUG/#endif
> > blocks.
> >
> > Miscellanea:
> >
> > o Move the sahara_state array into the function that uses it.
> >
> > Signed-off-by: Joe Perches <joe@perches.com>
> > ---
> >  drivers/crypto/sahara.c | 20 +++++++++-----------
> >  1 file changed, 9 insertions(+), 11 deletions(-)
>
> Even if this is correct this is way too ugly.  The original code
> at least compiled everything regardless of macros.  Your new code
> won't detect compile errors in debugging code unless debugging is
> enabled.
>

What's wrong with IS_ENABLED(DEBUG) anyway? It may not be 'normal use'
but it works fine.

  reply	other threads:[~2019-03-22 14:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-08  0:15 [possible PATCH] crypto: sahara - Use #ifdef DEBUG not IS_ENABLED(DEBUG) Joe Perches
2019-03-22 12:43 ` Herbert Xu
2019-03-22 14:29   ` Ard Biesheuvel [this message]
2019-03-22 15:07     ` Joe Perches
2019-03-22 16:21       ` Ard Biesheuvel
2019-03-22 16:29         ` Joe Perches
2019-03-22 12:54 ` Christophe Leroy
2019-03-22 14:13   ` Daniel Thompson

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=CAKv+Gu_SBkhV8SVXpOBDoPRBJYhFdmF3jJdZ5OPm3SrPBTSarQ@mail.gmail.com \
    --to=ard.biesheuvel@linaro.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=joe@perches.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.