From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755515AbbITRSu (ORCPT ); Sun, 20 Sep 2015 13:18:50 -0400 Received: from mail-qg0-f47.google.com ([209.85.192.47]:33097 "EHLO mail-qg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754809AbbITRQo (ORCPT ); Sun, 20 Sep 2015 13:16:44 -0400 From: =?UTF-8?q?Rapha=C3=ABl=20Beamonte?= To: Greg Kroah-Hartman Cc: =?UTF-8?q?Rapha=C3=ABl=20Beamonte?= , Cristina Opriceana , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCHv3 12/15] staging: rtl8192u: r8192U_core: rtl8192_tx: replace some inline conditions Date: Sun, 20 Sep 2015 13:14:24 -0400 Message-Id: <8e785405284d6ac4bb50047268f816cf37077aff.1442769012.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 b3cedec..7dc1b34 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -1546,12 +1546,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