From patchwork Sat Mar 28 12:52:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "M. Vefa Bicakci" X-Patchwork-Id: 6114001 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6E5839F327 for ; Sat, 28 Mar 2015 12:57:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B7FD203B7 for ; Sat, 28 Mar 2015 12:57:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 94051203AD for ; Sat, 28 Mar 2015 12:57:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753408AbbC1Mxk (ORCPT ); Sat, 28 Mar 2015 08:53:40 -0400 Received: from aibo.runbox.com ([91.220.196.211]:57341 "EHLO aibo.runbox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752054AbbC1Mxh (ORCPT ); Sat, 28 Mar 2015 08:53:37 -0400 Received: from [10.9.9.207] (helo=mailfront03.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1YbqF5-0000MO-8I; Sat, 28 Mar 2015 13:53:35 +0100 Received: from cpe5cd9985fdb46-cm602ad088a62b.cpe.net.cable.rogers.com ([99.241.131.156] helo=localhost.localdomain) by mailfront03.runbox.com with esmtpsa (uid:769847 ) (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) id 1YbqEx-0007nm-Op; Sat, 28 Mar 2015 13:53:27 +0100 From: "M. Vefa Bicakci" To: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org Cc: gregkh@linuxfoundation.org, Jes.Sorensen@redhat.com, joe@perches.com, Larry.Finger@lwfinger.net, mail@beyermatthias.de, m.v.b@runbox.com Subject: [PATCH v4 08/15] staging: rtl8723au: trailing statements should be on next line Date: Sat, 28 Mar 2015 08:52:41 -0400 Message-Id: <1427547168-12078-9-git-send-email-m.v.b@runbox.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1427547168-12078-1-git-send-email-m.v.b@runbox.com> References: <1427547168-12078-1-git-send-email-m.v.b@runbox.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Correct a number of checkpatch.pl errors in rtl8723au's rtw_security.c related to trailing statements: ERROR: trailing statements should be on next line Signed-off-by: M. Vefa Bicakci --- drivers/staging/rtl8723au/core/rtw_security.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_security.c b/drivers/staging/rtl8723au/core/rtw_security.c index b4327aaf71..803f8965a4 100644 --- a/drivers/staging/rtl8723au/core/rtw_security.c +++ b/drivers/staging/rtl8723au/core/rtw_security.c @@ -132,7 +132,8 @@ static u32 getcrc32(u8 *buf, int len) u8 *p; u32 crc; - if (bcrc32initialized == 0) crc32_init(); + if (bcrc32initialized == 0) + crc32_init(); crc = 0xffffffff; /* preload shift register, per CRC-32 spec */ @@ -559,8 +560,10 @@ static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16) u16 PPK[6]; /* temporary key for mixing */ /* Note: all adds in the PPK[] equations below are mod 2**16 */ - for (i = 0; i < 5; i++) PPK[i] = p1k[i]; /* first, copy P1K to PPK */ - PPK[5] = p1k[4] + iv16; /* next, add in IV16 */ + for (i = 0; i < 5; i++) + PPK[i] = p1k[i]; /* first, copy P1K to PPK */ + + PPK[5] = p1k[4] + iv16; /* next, add in IV16 */ /* Bijective non-linear mixing of the 96 bits of PPK[0..5] */ PPK[0] += _S_(PPK[5] ^ TK16(0)); /* Mix key in each "round" */ @@ -960,7 +963,8 @@ static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext) u8 intermediateb[16]; u8 round_key[16]; - for (i = 0; i < 16; i++) round_key[i] = key[i]; + for (i = 0; i < 16; i++) + round_key[i] = key[i]; for (round = 0; round < 11; round++) { if (round == 0) { @@ -1044,7 +1048,8 @@ static void construct_mic_header2(u8 *mic_header2, u8 *mpdu, int a4_exists, { int i; - for (i = 0; i < 16; i++) mic_header2[i] = 0x00; + for (i = 0; i < 16; i++) + mic_header2[i] = 0x00; mic_header2[0] = mpdu[16]; /* A3 */ mic_header2[1] = mpdu[17]; @@ -1057,7 +1062,8 @@ static void construct_mic_header2(u8 *mic_header2, u8 *mpdu, int a4_exists, mic_header2[7] = 0x00; /* mpdu[23]; */ if (!qc_exists && a4_exists) { - for (i = 0; i < 6; i++) mic_header2[8+i] = mpdu[24+i]; /* A4 */ + for (i = 0; i < 6; i++) + mic_header2[8+i] = mpdu[24+i]; /* A4 */ } if (qc_exists && !a4_exists) { @@ -1066,7 +1072,8 @@ static void construct_mic_header2(u8 *mic_header2, u8 *mpdu, int a4_exists, } if (qc_exists && a4_exists) { - for (i = 0; i < 6; i++) mic_header2[8+i] = mpdu[24+i]; /* A4 */ + for (i = 0; i < 6; i++) + mic_header2[8+i] = mpdu[24+i]; /* A4 */ mic_header2[14] = mpdu[30] & 0x0f; mic_header2[15] = mpdu[31] & 0x00; @@ -1084,7 +1091,9 @@ static void construct_ctr_preload(u8 *ctr_preload, int a4_exists, int qc_exists, { int i = 0; - for (i = 0; i < 16; i++) ctr_preload[i] = 0x00; + for (i = 0; i < 16; i++) + ctr_preload[i] = 0x00; + i = 0; ctr_preload[0] = 0x01; /* flag */