From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Nicolas Pitre <nico@linaro.org>,
Steve Capper <steve.capper@arm.com>,
linux-crypto@vger.kernel.org, linux-arm@lists.infradead.org
Subject: Re: [RFC PATCH 2/2] arm64: add support for AES using ARMv8 Crypto Extensions
Date: Sat, 14 Sep 2013 16:18:12 +0100 [thread overview]
Message-ID: <20130914151812.GJ12758@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <52346EA9.3020802@iki.fi>
On Sat, Sep 14, 2013 at 05:11:53PM +0300, Jussi Kivilinna wrote:
> On 14.09.2013 16:30, Ard Biesheuvel wrote:
> > On 14 September 2013 10:08, Jussi Kivilinna <jussi.kivilinna@iki.fi> wrote:
> >> On 13.09.2013 18:08, Ard Biesheuvel wrote:
> >>> This adds ARMv8 Crypto Extensions based implemenations of
> >>> AES in CBC, CTR and XTS mode.
> >>>
> >>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> >>> ---
> >> ..snip..
> >>> +static int xts_set_key(struct crypto_tfm *tfm, const u8 *in_key,
> >>> + unsigned int key_len)
> >>> +{
> >>> + struct crypto_aes_xts_ctx *ctx = crypto_tfm_ctx(tfm);
> >>> + u32 *flags = &tfm->crt_flags;
> >>> + int ret;
> >>> +
> >>> + ret = crypto_aes_expand_key(&ctx->key1, in_key, key_len/2);
> >>> + if (!ret)
> >>> + ret = crypto_aes_expand_key(&ctx->key2, &in_key[key_len/2],
> >>> + key_len/2);
> >>
> >> Use checkpatch.
> >>
> >
> > Um, I did get a bunch of errors and warnings from checkpatch.pl tbh,
> > put not in this particular location. Care to elaborate?
> >
>
> Well, the checkpatch.pl I had stored to brain had become corrupted and kept
> saying that you need spaces around all operators. But apparently spaces are
> just required for assignment operators.
checkpatch is not definitive. It is merely an implementation of the
coding style. The coding style is the definitive documentation, and
it says about this:
| Use one space around (on each side of) most binary and ternary operators,
| such as any of these:
|
| = + - < > * / % | & ^ <= >= == != ? :
|
| but no space after unary operators:
| & * + - ~ ! sizeof typeof alignof __attribute__ defined
|
| no space before the postfix increment & decrement unary operators:
| ++ --
|
| no space after the prefix increment & decrement unary operators:
| ++ --
|
| and no space around the '.' and "->" structure member operators.
So, you're quite right that the above is wrong. It needs spaces around the
"/" operators.
prev parent reply other threads:[~2013-09-15 14:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 15:08 [RFC PATCH 0/2] AES in CBC/CTR/XTS modes using ARMv8 Crypto Extensions Ard Biesheuvel
2013-09-13 15:08 ` [RFC PATCH 1/2] crypto: move ablk_helper out of arch/x86 Ard Biesheuvel
2013-09-14 7:26 ` Jussi Kivilinna
2013-09-13 15:08 ` [RFC PATCH 2/2] arm64: add support for AES using ARMv8 Crypto Extensions Ard Biesheuvel
2013-09-14 8:08 ` Jussi Kivilinna
2013-09-14 13:30 ` Ard Biesheuvel
2013-09-14 14:11 ` Jussi Kivilinna
2013-09-14 15:18 ` Russell King - ARM Linux [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=20130914151812.GJ12758@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=ard.biesheuvel@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=jussi.kivilinna@iki.fi \
--cc=linux-arm@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=nico@linaro.org \
--cc=steve.capper@arm.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 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).