From: Antoine Tenart <antoine.tenart@bootlin.com>
To: Pascal Van Leeuwen <pvanleeuwen@verimatrix.com>
Cc: Antoine Tenart <antoine.tenart@bootlin.com>,
Pascal van Leeuwen <pascalvanl@gmail.com>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
"davem@davemloft.net" <davem@davemloft.net>
Subject: Re: [PATCH 1/2] crypto: inside-secure - Added support for the CHACHA20 skcipher
Date: Wed, 11 Sep 2019 16:21:07 +0100 [thread overview]
Message-ID: <20190911152107.GA5492@kwain> (raw)
In-Reply-To: <MN2PR20MB297383846FB390299EFEA0C3CAB60@MN2PR20MB2973.namprd20.prod.outlook.com>
Hello Pascal,
On Tue, Sep 10, 2019 at 06:58:18PM +0000, Pascal Van Leeuwen wrote:
> > On Tue, Sep 10, 2019 at 04:38:12PM +0200, Pascal van Leeuwen wrote:
> > > @@ -112,7 +123,7 @@ static void safexcel_cipher_token(struct safexcel_cipher_ctx *ctx, u8
> > *iv,
> > > block_sz = DES3_EDE_BLOCK_SIZE;
> > > cdesc->control_data.options |= EIP197_OPTION_2_TOKEN_IV_CMD;
> > > break;
> > > - case SAFEXCEL_AES:
> > > + default: /* case SAFEXCEL_AES */
> >
> > Can't you keep an explicit case here?
> >
> If I do that, the compiler will complain about SAFEXCEL_CHACHA20 not
> being covered. And Chacha20 won't even make it this far, so it doesn't
> make much sense to add that to the switch.
>
> I suppose an explicit case plus an empty default would be an alternative?
> But I figured the comment should suffice to remind anyone working on that
> switch statement what it should really do. I'm fine with either approach.
Yes, please use an explicit case and an empty default.
Thanks,
Antoine
--
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2019-09-11 15:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-10 14:38 [PATCH 0/2] crypto: inside-secure: Add support for the Chacha20 skcipher and the Chacha20-Poly1305 AEAD suites Pascal van Leeuwen
2019-09-10 14:38 ` [PATCH 1/2] crypto: inside-secure - Added support for the CHACHA20 skcipher Pascal van Leeuwen
2019-09-10 17:32 ` Antoine Tenart
2019-09-10 18:58 ` Pascal Van Leeuwen
2019-09-11 15:21 ` Antoine Tenart [this message]
2019-09-11 15:32 ` Pascal Van Leeuwen
2019-09-10 14:38 ` [PATCH 2/2] crypto: inside-secure - Add support for the Chacha20-Poly1305 AEAD Pascal van Leeuwen
2019-09-11 15:29 ` Antoine Tenart
2019-09-11 15:37 ` Pascal Van Leeuwen
2019-09-11 15:45 ` Antoine Tenart
2019-09-11 15:49 ` Pascal Van Leeuwen
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=20190911152107.GA5492@kwain \
--to=antoine.tenart@bootlin.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=pascalvanl@gmail.com \
--cc=pvanleeuwen@verimatrix.com \
/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.