Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: khazad,wp512 - remove leading spaces before tabs

There are a few leading spaces before tabs and remove it by running the
following commard:

$ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/'

At the same time, fix two warning by running checkpatch.pl:
WARNING: suspect code indent for conditional statements (16, 16)
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Hui Tang <tanghui20@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Hui Tang and committed by
Herbert Xu
30836548 155f7d32

+20 -22
+1 -1
crypto/khazad.c
··· 819 819 T6[(int)(state >> 8) & 0xff] ^ 820 820 T7[(int)(state ) & 0xff] ^ 821 821 roundKey[r]; 822 - } 822 + } 823 823 824 824 state = (T0[(int)(state >> 56) ] & 0xff00000000000000ULL) ^ 825 825 (T1[(int)(state >> 48) & 0xff] & 0x00ff000000000000ULL) ^
+19 -21
crypto/wp512.c
··· 1066 1066 { 1067 1067 struct wp512_ctx *wctx = shash_desc_ctx(desc); 1068 1068 int i; 1069 - u8 *buffer = wctx->buffer; 1070 - u8 *bitLength = wctx->bitLength; 1071 - int bufferBits = wctx->bufferBits; 1072 - int bufferPos = wctx->bufferPos; 1069 + u8 *buffer = wctx->buffer; 1070 + u8 *bitLength = wctx->bitLength; 1071 + int bufferBits = wctx->bufferBits; 1072 + int bufferPos = wctx->bufferPos; 1073 1073 __be64 *digest = (__be64 *)out; 1074 1074 1075 - buffer[bufferPos] |= 0x80U >> (bufferBits & 7); 1076 - bufferPos++; 1077 - if (bufferPos > WP512_BLOCK_SIZE - WP512_LENGTHBYTES) { 1078 - if (bufferPos < WP512_BLOCK_SIZE) { 1079 - memset(&buffer[bufferPos], 0, WP512_BLOCK_SIZE - bufferPos); 1080 - } 1081 - wp512_process_buffer(wctx); 1082 - bufferPos = 0; 1083 - } 1084 - if (bufferPos < WP512_BLOCK_SIZE - WP512_LENGTHBYTES) { 1085 - memset(&buffer[bufferPos], 0, 1075 + buffer[bufferPos] |= 0x80U >> (bufferBits & 7); 1076 + bufferPos++; 1077 + if (bufferPos > WP512_BLOCK_SIZE - WP512_LENGTHBYTES) { 1078 + if (bufferPos < WP512_BLOCK_SIZE) 1079 + memset(&buffer[bufferPos], 0, WP512_BLOCK_SIZE - bufferPos); 1080 + wp512_process_buffer(wctx); 1081 + bufferPos = 0; 1082 + } 1083 + if (bufferPos < WP512_BLOCK_SIZE - WP512_LENGTHBYTES) 1084 + memset(&buffer[bufferPos], 0, 1086 1085 (WP512_BLOCK_SIZE - WP512_LENGTHBYTES) - bufferPos); 1087 - } 1088 - bufferPos = WP512_BLOCK_SIZE - WP512_LENGTHBYTES; 1089 - memcpy(&buffer[WP512_BLOCK_SIZE - WP512_LENGTHBYTES], 1086 + bufferPos = WP512_BLOCK_SIZE - WP512_LENGTHBYTES; 1087 + memcpy(&buffer[WP512_BLOCK_SIZE - WP512_LENGTHBYTES], 1090 1088 bitLength, WP512_LENGTHBYTES); 1091 - wp512_process_buffer(wctx); 1089 + wp512_process_buffer(wctx); 1092 1090 for (i = 0; i < WP512_DIGEST_SIZE/8; i++) 1093 1091 digest[i] = cpu_to_be64(wctx->hash[i]); 1094 - wctx->bufferBits = bufferBits; 1095 - wctx->bufferPos = bufferPos; 1092 + wctx->bufferBits = bufferBits; 1093 + wctx->bufferPos = bufferPos; 1096 1094 1097 1095 return 0; 1098 1096 }