diff options
author | Brother Matthew De Angelis <matthew.v.deangelis@gmail.com> | 2020-12-12 01:28:45 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-28 17:08:29 +0300 |
commit | df94d3b2a9a46477f4a5ea58fa6dc360046bd827 (patch) | |
tree | b0e338cc912f626c9bd9399d3b236d1919ba4206 /drivers/staging/rtl8723bs/core/rtw_security.c | |
parent | 3989f5a5f81c97732f9e3b3ae2d1d7923f6e7653 (diff) | |
download | linux-df94d3b2a9a46477f4a5ea58fa6dc360046bd827.tar.xz |
Staging: rtl8723bs/core: fix braces coding style issues
Fix all the braces coding style issues found by checkpatch.pl in
rtw_security.c.
Signed-off-by: Brother Matthew De Angelis <matthew.v.deangelis@gmail.com>
Link: https://lore.kernel.org/r/20201211222845.GA543167@a
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723bs/core/rtw_security.c')
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_security.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c index a83d8f7f611c..a311595deafb 100644 --- a/drivers/staging/rtl8723bs/core/rtw_security.c +++ b/drivers/staging/rtl8723bs/core/rtw_security.c @@ -171,9 +171,8 @@ static void crc32_init(void) for (i = 0; i < 256; ++i) { k = crc32_reverseBit((u8)i); - for (c = ((u32)k) << 24, j = 8; j > 0; --j) { + for (c = ((u32)k) << 24, j = 8; j > 0; --j) c = c & 0x80000000 ? (c << 1) ^ CRC32_POLY_BE : (c << 1); - } p1 = (u8 *)&crc32_table[i]; p1[0] = crc32_reverseBit(p[3]); @@ -195,9 +194,8 @@ static __le32 getcrc32(u8 *buf, sint len) crc = 0xffffffff; /* preload shift register, per CRC-32 spec */ - for (p = buf; len > 0; ++p, --len) { + for (p = buf; len > 0; ++p, --len) crc = crc32_table[(crc ^ *p) & 0xff] ^ (crc >> 8); - } return cpu_to_le32(~crc); /* transmit complement, per CRC-32 spec */ } @@ -320,9 +318,8 @@ static u32 secmicgetuint32(u8 *p) s32 i; u32 res = 0; - for (i = 0; i < 4; i++) { + for (i = 0; i < 4; i++) res |= ((u32)(*p++)) << (8*i); - } return res; } @@ -396,9 +393,8 @@ void rtw_secgetmic(struct mic_data *pmicdata, u8 *dst) rtw_secmicappendbyte(pmicdata, 0); rtw_secmicappendbyte(pmicdata, 0); /* and then zeroes until the length is a multiple of 4 */ - while (pmicdata->nBytesInM != 0) { + while (pmicdata->nBytesInM != 0) rtw_secmicappendbyte(pmicdata, 0); - } /* The appendByte function has already computed the result. */ secmicputuint32(dst, pmicdata->L); secmicputuint32(dst+4, pmicdata->R); @@ -918,9 +914,8 @@ static void xor_128(u8 *a, u8 *b, u8 *out) { sint i; - for (i = 0; i < 16; i++) { + for (i = 0; i < 16; i++) out[i] = a[i] ^ b[i]; - } } @@ -928,9 +923,8 @@ static void xor_32(u8 *a, u8 *b, u8 *out) { sint i; - for (i = 0; i < 4; i++) { + for (i = 0; i < 4; i++) out[i] = a[i] ^ b[i]; - } } @@ -969,9 +963,8 @@ static void byte_sub(u8 *in, u8 *out) { sint i; - for (i = 0; i < 16; i++) { + for (i = 0; i < 16; i++) out[i] = sbox(in[i]); - } } @@ -1259,9 +1252,8 @@ static void bitwise_xor(u8 *ina, u8 *inb, u8 *out) { sint i; - for (i = 0; i < 16; i++) { + for (i = 0; i < 16; i++) out[i] = ina[i] ^ inb[i]; - } } static sint aes_cipher(u8 *key, uint hdrlen, |