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@xxxxxx> 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@xxxxxxxxxx> > >>> --- > >> ..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. -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html