crypto: cast6 - Fix checkpatch errors
Signed-off-by: Richard Hartmann <richih.mailinglist@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
a1f4c9222d
commit
87c3be87e9
1 changed files with 62 additions and 60 deletions
|
@ -369,7 +369,8 @@ static const u8 Tr[4][8] = {
|
|||
};
|
||||
|
||||
/* forward octave */
|
||||
static void W(u32 *key, unsigned int i) {
|
||||
static void W(u32 *key, unsigned int i)
|
||||
{
|
||||
u32 I;
|
||||
key[6] ^= F1(key[7], Tr[i % 4][0], Tm[i][0]);
|
||||
key[5] ^= F2(key[6], Tr[i % 4][1], Tm[i][1]);
|
||||
|
@ -407,8 +408,6 @@ static int cast6_setkey(struct crypto_tfm *tfm, const u8 *in_key,
|
|||
key[6] = be32_to_cpu(p_key[6]); /* G */
|
||||
key[7] = be32_to_cpu(p_key[7]); /* H */
|
||||
|
||||
|
||||
|
||||
for (i = 0; i < 12; i++) {
|
||||
W(key, 2 * i);
|
||||
W(key, 2 * i + 1);
|
||||
|
@ -428,7 +427,8 @@ static int cast6_setkey(struct crypto_tfm *tfm, const u8 *in_key,
|
|||
}
|
||||
|
||||
/*forward quad round*/
|
||||
static void Q (u32 * block, u8 * Kr, u32 * Km) {
|
||||
static void Q(u32 *block, u8 *Kr, u32 *Km)
|
||||
{
|
||||
u32 I;
|
||||
block[2] ^= F1(block[3], Kr[0], Km[0]);
|
||||
block[1] ^= F2(block[2], Kr[1], Km[1]);
|
||||
|
@ -437,7 +437,8 @@ static void Q (u32 * block, u8 * Kr, u32 * Km) {
|
|||
}
|
||||
|
||||
/*reverse quad round*/
|
||||
static void QBAR (u32 * block, u8 * Kr, u32 * Km) {
|
||||
static void QBAR(u32 *block, u8 *Kr, u32 *Km)
|
||||
{
|
||||
u32 I;
|
||||
block[3] ^= F1(block[0], Kr[3], Km[3]);
|
||||
block[0] ^= F3(block[1], Kr[2], Km[2]);
|
||||
|
@ -478,7 +479,8 @@ static void cast6_encrypt(struct crypto_tfm *tfm, u8 *outbuf, const u8 *inbuf)
|
|||
dst[3] = cpu_to_be32(block[3]);
|
||||
}
|
||||
|
||||
static void cast6_decrypt(struct crypto_tfm *tfm, u8 *outbuf, const u8 *inbuf) {
|
||||
static void cast6_decrypt(struct crypto_tfm *tfm, u8 *outbuf, const u8 *inbuf)
|
||||
{
|
||||
struct cast6_ctx *c = crypto_tfm_ctx(tfm);
|
||||
const __be32 *src = (const __be32 *)inbuf;
|
||||
__be32 *dst = (__be32 *)outbuf;
|
||||
|
|
Loading…
Reference in a new issue