Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87c3be87 authored by Richard Hartmann's avatar Richard Hartmann Committed by Herbert Xu
Browse files

crypto: cast6 - Fix checkpatch errors

parent a1f4c922
Loading
Loading
Loading
Loading
+62 −60
Original line number Diff line number Diff line
@@ -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;