From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752396AbbIKHcE (ORCPT ); Fri, 11 Sep 2015 03:32:04 -0400 Received: from mail-qg0-f44.google.com ([209.85.192.44]:36173 "EHLO mail-qg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752343AbbIKHcA (ORCPT ); Fri, 11 Sep 2015 03:32:00 -0400 From: =?UTF-8?q?Rapha=C3=ABl=20Beamonte?= To: Greg Kroah-Hartman Cc: Dan Carpenter , =?UTF-8?q?Rapha=C3=ABl=20Beamonte?= , Cristina Opriceana , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCHv2 13/16] staging: rtl8192u: r8192U_core: rtl8192_tx: replace some inline conditions Date: Fri, 11 Sep 2015 03:29:21 -0400 Message-Id: <0695b998a110ffbf83a4b6de2c3354045057ccf0.1441955761.git.raphael.beamonte@gmail.com> X-Mailer: git-send-email 2.5.1 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace some inline conditions by a full if-else statement to make the source clearer and follow the 80 characters kernel code style rule. Signed-off-by: Raphaƫl Beamonte --- drivers/staging/rtl8192u/r8192U_core.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index ba33b96..189de56 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -1596,12 +1596,18 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb) tx_fwinfo->RtsEnable = (tcb_desc->bRTSEnable) ? 1 : 0; tx_fwinfo->CtsEnable = (tcb_desc->bCTSEnable) ? 1 : 0; tx_fwinfo->RtsSTBC = (tcb_desc->bRTSSTBC) ? 1 : 0; - tx_fwinfo->RtsHT = (tcb_desc->rts_rate & 0x80) ? 1 : 0; tx_fwinfo->RtsRate = MRateToHwRate8190Pci((u8)tcb_desc->rts_rate); - tx_fwinfo->RtsSubcarrier = (tx_fwinfo->RtsHT == 0) ? (tcb_desc->RTSSC) : 0; - tx_fwinfo->RtsBandwidth = (tx_fwinfo->RtsHT == 1) ? ((tcb_desc->bRTSBW) ? 1 : 0) : 0; - tx_fwinfo->RtsShort = (tx_fwinfo->RtsHT == 0) ? (tcb_desc->bRTSUseShortPreamble ? 1 : 0) : - (tcb_desc->bRTSUseShortGI ? 1 : 0); + if (tcb_desc->rts_rate & 0x80) { + tx_fwinfo->RtsHT = 1; + tx_fwinfo->RtsSubcarrier = 0; + tx_fwinfo->RtsBandwidth = (tcb_desc->bRTSBW) ? 1 : 0; + tx_fwinfo->RtsShort = (tcb_desc->bRTSUseShortGI ? 1 : 0); + } else { + tx_fwinfo->RtsHT = 0; + tx_fwinfo->RtsSubcarrier = tcb_desc->RTSSC; + tx_fwinfo->RtsBandwidth = 0; + tx_fwinfo->RtsShort = (tcb_desc->bRTSUseShortPreamble ? 1 : 0); + } /* Set Bandwidth and sub-channel settings. */ if (priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20_40) { -- 2.5.1