mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tim Chen <tim.c.chen@linux.intel.com>
To: LABBE Corentin <clabbe.montjoie@gmail.com>
Cc: tglx@linutronix.de, ameenali023@gmail.com, bp@alien8.de,
	dan.carpenter@oracle.com, davem@davemloft.net, firogm@gmail.com,
	herbert@gondor.apana.org.au, hpa@zytor.com, mingo@redhat.com,
	minipli@googlemail.com, smueller@chronox.de, x86@kernel.org,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: x86: Remove duplicate define of SHA1_DIGEST_SIZE
Date: Thu, 29 Oct 2015 09:16:27 -0700	[thread overview]
Message-ID: <1446135387.14635.10.camel@schen9-desk2.jf.intel.com> (raw)
In-Reply-To: <20151029075108.GA25880@Red>

On Thu, 2015-10-29 at 08:51 +0100, LABBE Corentin wrote:
> On Fri, Oct 16, 2015 at 09:04:58AM -0700, Tim Chen wrote:
> > On Wed, 2015-10-14 at 21:15 +0200, LABBE Corentin wrote:
> > > The sha x86 crypto code use two define for the same thing:
> > > NUM_SHA1_DIGEST_WORDS and SHA1_DIGEST_LENGTH
> > > Replace them by SHA1_DIGEST_SIZE/4
> > 
> > Thanks.  Acked-by: Tim Chen <tim.c.chen@linux.intel.com>
> > > 
> > > Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> > 
> 
> Hello
> 
> Thanks for your ack, but Thomas Gleixner in the same time NACK this patch.
> Just in case I attach the new patch, for permit you to decide which one you prefer.
> 
> Regards

Looks fine.  But wonder if you should have
#define SHA1_DIGEST_WORDS (SHA1_DIGEST_SIZE / sizeof(u32))

moved to sha1.h

Tim
> 

> diff --git a/arch/x86/crypto/sha-mb/sha_mb_ctx.h b/arch/x86/crypto/sha-mb/sha_mb_ctx.h
> index e36069d..9fd36eb5 100644
> --- a/arch/x86/crypto/sha-mb/sha_mb_ctx.h
> +++ b/arch/x86/crypto/sha-mb/sha_mb_ctx.h
> @@ -94,7 +94,6 @@ enum hash_ctx_error {
>  
> 
>  /* Hash Constants and Typedefs */
> -#define SHA1_DIGEST_LENGTH          5
>  #define SHA1_LOG2_BLOCK_SIZE        6
>  
>  #define SHA1_PADLENGTHFIELD_SIZE    8
> diff --git a/arch/x86/crypto/sha-mb/sha_mb_mgr.h b/arch/x86/crypto/sha-mb/sha_mb_mgr.h
> index 08ad1a9..b295e15 100644
> --- a/arch/x86/crypto/sha-mb/sha_mb_mgr.h
> +++ b/arch/x86/crypto/sha-mb/sha_mb_mgr.h
> @@ -54,10 +54,10 @@
>  #ifndef __SHA_MB_MGR_H
>  #define __SHA_MB_MGR_H
>  
> -
> +#include <crypto/sha.h>
>  #include <linux/types.h>
>  
> -#define NUM_SHA1_DIGEST_WORDS 5
> +#define SHA1_DIGEST_WORDS (SHA1_DIGEST_SIZE / sizeof(u32))

Suggest to move SHA1_DIGEST_WORDS to sha1.h

Tim




      reply	other threads:[~2015-10-29 16:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14 19:15 LABBE Corentin
2015-10-14 20:44 ` Thomas Gleixner
2015-10-16 16:04 ` Tim Chen
2015-10-29  7:51   ` LABBE Corentin
2015-10-29 16:16     ` Tim Chen [this message]

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=1446135387.14635.10.camel@schen9-desk2.jf.intel.com \
    --to=tim.c.chen@linux.intel.com \
    --cc=ameenali023@gmail.com \
    --cc=bp@alien8.de \
    --cc=clabbe.montjoie@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=firogm@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=hpa@zytor.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=minipli@googlemail.com \
    --cc=smueller@chronox.de \
    --cc=tglx@linutronix.de \
    --cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®