diff options
author | M. Vefa Bicakci <m.v.b@runbox.com> | 2015-03-28 21:07:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-04-03 09:25:45 -0400 |
commit | 47b720a16cff11ba822000104bac7dcf6fa1cfbb (patch) | |
tree | 45375ef72e134c605cf8b1cbc531001bbab9626d /drivers/staging | |
parent | 444c704321a6e97efbc16d252cbecb5897749221 (diff) |
staging: rtl8723au: Remove unneeded curly braces
Correct a number of checkpatch.pl warnings in rtl8723au's rtw_security.c
related to the existence of unnecessary curly braces around single
statement blocks:
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rtl8723au/core/rtw_security.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/staging/rtl8723au/core/rtw_security.c b/drivers/staging/rtl8723au/core/rtw_security.c index b85e5de5f136..e8efdcd06329 100644 --- a/drivers/staging/rtl8723au/core/rtw_security.c +++ b/drivers/staging/rtl8723au/core/rtw_security.c | |||
@@ -113,9 +113,8 @@ static void crc32_init(void) | |||
113 | for (i = 0; i < 256; ++i) { | 113 | for (i = 0; i < 256; ++i) { |
114 | k = crc32_reverseBit((u8)i); | 114 | k = crc32_reverseBit((u8)i); |
115 | 115 | ||
116 | for (c = ((u32)k) << 24, j = 8; j > 0; --j) { | 116 | for (c = ((u32)k) << 24, j = 8; j > 0; --j) |
117 | c = c & 0x80000000 ? (c << 1) ^ CRC32_POLY : (c << 1); | 117 | c = c & 0x80000000 ? (c << 1) ^ CRC32_POLY : (c << 1); |
118 | } | ||
119 | 118 | ||
120 | p1 = (u8 *)&crc32_table[i]; | 119 | p1 = (u8 *)&crc32_table[i]; |
121 | 120 | ||
@@ -264,9 +263,8 @@ static u32 secmicgetuint32(u8 *p) | |||
264 | s32 i; | 263 | s32 i; |
265 | u32 res = 0; | 264 | u32 res = 0; |
266 | 265 | ||
267 | for (i = 0; i < 4; i++) { | 266 | for (i = 0; i < 4; i++) |
268 | res |= ((u32)(*p++)) << (8 * i); | 267 | res |= ((u32)(*p++)) << (8 * i); |
269 | } | ||
270 | 268 | ||
271 | return res; | 269 | return res; |
272 | } | 270 | } |
@@ -350,9 +348,8 @@ void rtw_secgetmic23a(struct mic_data *pmicdata, u8 *dst) | |||
350 | rtw_secmicappend23abyte23a(pmicdata, 0); | 348 | rtw_secmicappend23abyte23a(pmicdata, 0); |
351 | rtw_secmicappend23abyte23a(pmicdata, 0); | 349 | rtw_secmicappend23abyte23a(pmicdata, 0); |
352 | /* and then zeroes until the length is a multiple of 4 */ | 350 | /* and then zeroes until the length is a multiple of 4 */ |
353 | while (pmicdata->nBytesInM != 0) { | 351 | while (pmicdata->nBytesInM != 0) |
354 | rtw_secmicappend23abyte23a(pmicdata, 0); | 352 | rtw_secmicappend23abyte23a(pmicdata, 0); |
355 | } | ||
356 | /* The appendByte function has already computed the result. */ | 353 | /* The appendByte function has already computed the result. */ |
357 | secmicputuint32(dst, pmicdata->L); | 354 | secmicputuint32(dst, pmicdata->L); |
358 | secmicputuint32(dst + 4, pmicdata->R); | 355 | secmicputuint32(dst + 4, pmicdata->R); |
@@ -888,10 +885,8 @@ static void byte_sub(u8 *in, u8 *out) | |||
888 | { | 885 | { |
889 | int i; | 886 | int i; |
890 | 887 | ||
891 | for (i = 0; i < 16; i++) { | 888 | for (i = 0; i < 16; i++) |
892 | out[i] = sbox(in[i]); | 889 | out[i] = sbox(in[i]); |
893 | } | ||
894 | |||
895 | } | 890 | } |
896 | 891 | ||
897 | static void shift_row(u8 *in, u8 *out) | 892 | static void shift_row(u8 *in, u8 *out) |
@@ -952,9 +947,8 @@ static void mix_column(u8 *in, u8 *out) | |||
952 | 947 | ||
953 | for (i = 3; i > 0; i--) { /* logical shift left 1 bit */ | 948 | for (i = 3; i > 0; i--) { /* logical shift left 1 bit */ |
954 | andf7[i] = andf7[i] << 1; | 949 | andf7[i] = andf7[i] << 1; |
955 | if ((andf7[i - 1] & 0x80) == 0x80) { | 950 | if ((andf7[i - 1] & 0x80) == 0x80) |
956 | andf7[i] = (andf7[i] | 0x01); | 951 | andf7[i] = (andf7[i] | 0x01); |
957 | } | ||
958 | } | 952 | } |
959 | andf7[0] = andf7[0] << 1; | 953 | andf7[0] = andf7[0] << 1; |
960 | andf7[0] = andf7[0] & 0xfe; | 954 | andf7[0] = andf7[0] & 0xfe; |