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

Commit 189bd4b0 authored by Richard Hartmann's avatar Richard Hartmann Committed by Herbert Xu
Browse files

crypto: anubis - Fix checkpatch errors

parent 5357c6c4
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -469,8 +469,7 @@ static int anubis_setkey(struct crypto_tfm *tfm, const u8 *in_key,
	u32 kappa[ANUBIS_MAX_N];
	u32 inter[ANUBIS_MAX_N];

	switch (key_len)
	{
	switch (key_len) {
		case 16: case 20: case 24: case 28:
		case 32: case 36: case 40:
			break;
@@ -530,24 +529,25 @@ static int anubis_setkey(struct crypto_tfm *tfm, const u8 *in_key,
		/*
		 * compute kappa^{r+1} from kappa^r:
		 */
		if (r == R) {
		if (r == R)
			break;
		}
		for (i = 0; i < N; i++) {
			int j = i;
			inter[i]  = T0[(kappa[j--] >> 24)       ];
			if (j < 0) j = N - 1;
			if (j < 0)
				j = N - 1;
			inter[i] ^= T1[(kappa[j--] >> 16) & 0xff];
			if (j < 0) j = N - 1;
			if (j < 0)
				j = N - 1;
			inter[i] ^= T2[(kappa[j--] >>  8) & 0xff];
			if (j < 0) j = N - 1;
			if (j < 0)
				j = N - 1;
			inter[i] ^= T3[(kappa[j  ]      ) & 0xff];
		}
		kappa[0] = inter[0] ^ rc[r];
		for (i = 1; i < N; i++) {
		for (i = 1; i < N; i++)
			kappa[i] = inter[i];
	}
	}

	/*
	 * generate inverse key schedule: K'^0 = K^R, K'^R =