All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcos Oviedo <devkerp@gmail.com>
To: Larry.Finger@lwfinger.net
Cc: gregkh@linuxfoundation.org, Jes.Sorensen@redhat.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	joe@perches.com, Marcos Oviedo <devkerp@gmail.com>
Subject: [PATCH] Staging: R8723au: rtw_ieee80211: Fixing code style space issues
Date: Wed, 11 Nov 2015 02:48:38 -0500	[thread overview]
Message-ID: <1447228118-18609-1-git-send-email-devkerp@gmail.com> (raw)

Fixing code style space issues at rtw_mcs_rate23a()

Signed-off-by: Marcos Oviedo <devkerp@gmail.com>
---
 drivers/staging/rtl8723au/core/rtw_ieee80211.c |   80 ++++++++++++++----------
 1 file changed, 48 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_ieee80211.c b/drivers/staging/rtl8723au/core/rtw_ieee80211.c
index 07a6490..df89833 100644
--- a/drivers/staging/rtl8723au/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723au/core/rtw_ieee80211.c
@@ -791,64 +791,80 @@ u16 rtw_mcs_rate23a(u8 rf_type, u8 bw_40MHz, u8 short_GI_20, u8 short_GI_40,
 
 	if (rf_type == RF_1T1R) {
 		if (mcs->rx_mask[0] & BIT(7))
-			max_rate = (bw_40MHz) ? ((short_GI_40)?1500:1350):
-				((short_GI_20)?722:650);
+			max_rate = (bw_40MHz) ? ((short_GI_40) ? 1500 : 1350) :
+				((short_GI_20) ? 722 : 650);
 		else if (mcs->rx_mask[0] & BIT(6))
-			max_rate = (bw_40MHz) ? ((short_GI_40)?1350:1215):
-				((short_GI_20)?650:585);
+			max_rate = (bw_40MHz) ? ((short_GI_40) ? 1350 : 1215) :
+				((short_GI_20) ? 650 : 585);
 		else if (mcs->rx_mask[0] & BIT(5))
-			max_rate = (bw_40MHz) ? ((short_GI_40)?1200:1080):
-				((short_GI_20)?578:520);
+			max_rate = (bw_40MHz) ? ((short_GI_40) ? 1200 : 1080) :
+				((short_GI_20) ? 578 : 520);
 		else if (mcs->rx_mask[0] & BIT(4))
-			max_rate = (bw_40MHz) ? ((short_GI_40)?900:810):
-				((short_GI_20)?433:390);
+			max_rate = (bw_40MHz) ? ((short_GI_40) ? 900 : 810) :
+				((short_GI_20) ? 433 : 390);
 		else if (mcs->rx_mask[0] & BIT(3))
-			max_rate = (bw_40MHz) ? ((short_GI_40)?600:540):
-				((short_GI_20)?289:260);
+			max_rate = (bw_40MHz) ? ((short_GI_40) ? 600 : 540) :
+				((short_GI_20) ? 289 : 260);
 		else if (mcs->rx_mask[0] & BIT(2))
-			max_rate = (bw_40MHz) ? ((short_GI_40)?450:405):
-				((short_GI_20)?217:195);
+			max_rate = (bw_40MHz) ? ((short_GI_40) ? 450 : 405) :
+				((short_GI_20) ? 217 : 195);
 		else if (mcs->rx_mask[0] & BIT(1))
-			max_rate = (bw_40MHz) ? ((short_GI_40)?300:270):
-				((short_GI_20)?144:130);
+			max_rate = (bw_40MHz) ? ((short_GI_40) ? 300 : 270) :
+				((short_GI_20) ? 144 : 130);
 		else if (mcs->rx_mask[0] & BIT(0))
-			max_rate = (bw_40MHz) ? ((short_GI_40)?150:135):
-				((short_GI_20)?72:65);
+			max_rate = (bw_40MHz) ? ((short_GI_40) ? 150 : 135) :
+				((short_GI_20) ? 72 : 65);
 	} else {
 		if (mcs->rx_mask[1]) {
 			if (mcs->rx_mask[1] & BIT(7))
-				max_rate = (bw_40MHz) ? ((short_GI_40)?3000:2700):((short_GI_20)?1444:1300);
+				max_rate = (bw_40MHz) ? ((short_GI_40) ? 3000 : 2700) :
+					((short_GI_20) ? 1444 : 1300);
 			else if (mcs->rx_mask[1] & BIT(6))
-				max_rate = (bw_40MHz) ? ((short_GI_40)?2700:2430):((short_GI_20)?1300:1170);
+				max_rate = (bw_40MHz) ? ((short_GI_40) ? 2700 : 2430) :
+					((short_GI_20) ? 1300 : 1170);
 			else if (mcs->rx_mask[1] & BIT(5))
-				max_rate = (bw_40MHz) ? ((short_GI_40)?2400:2160):((short_GI_20)?1156:1040);
+				max_rate = (bw_40MHz) ? ((short_GI_40) ? 2400 : 2160) :
+					((short_GI_20) ? 1156 : 1040);
 			else if (mcs->rx_mask[1] & BIT(4))
-				max_rate = (bw_40MHz) ? ((short_GI_40)?1800:1620):((short_GI_20)?867:780);
+				max_rate = (bw_40MHz) ? ((short_GI_40) ? 1800 : 1620) :
+					((short_GI_20) ? 867 : 780);
 			else if (mcs->rx_mask[1] & BIT(3))
-				max_rate = (bw_40MHz) ? ((short_GI_40)?1200:1080):((short_GI_20)?578:520);
+				max_rate = (bw_40MHz) ? ((short_GI_40) ? 1200 : 1080) :
+					((short_GI_20) ? 578 : 520);
 			else if (mcs->rx_mask[1] & BIT(2))
-				max_rate = (bw_40MHz) ? ((short_GI_40)?900:810):((short_GI_20)?433:390);
+				max_rate = (bw_40MHz) ? ((short_GI_40) ? 900 : 810) :
+					((short_GI_20) ? 433 : 390);
 			else if (mcs->rx_mask[1] & BIT(1))
-				max_rate = (bw_40MHz) ? ((short_GI_40)?600:540):((short_GI_20)?289:260);
+				max_rate = (bw_40MHz) ? ((short_GI_40) ? 600 : 540) :
+					((short_GI_20) ? 289 : 260);
 			else if (mcs->rx_mask[1] & BIT(0))
-				max_rate = (bw_40MHz) ? ((short_GI_40)?300:270):((short_GI_20)?144:130);
+				max_rate = (bw_40MHz) ? ((short_GI_40) ? 300 : 270) :
+					((short_GI_20) ? 144 : 130);
 		} else {
 			if (mcs->rx_mask[0] & BIT(7))
-				max_rate = (bw_40MHz) ? ((short_GI_40)?1500:1350):((short_GI_20)?722:650);
+				max_rate = (bw_40MHz) ? ((short_GI_40) ? 1500 : 1350) :
+					((short_GI_20) ? 722 : 650);
 			else if (mcs->rx_mask[0] & BIT(6))
-				max_rate = (bw_40MHz) ? ((short_GI_40)?1350:1215):((short_GI_20)?650:585);
+				max_rate = (bw_40MHz) ? ((short_GI_40) ? 1350 : 1215) :
+					((short_GI_20) ? 650 : 585);
 			else if (mcs->rx_mask[0] & BIT(5))
-				max_rate = (bw_40MHz) ? ((short_GI_40)?1200:1080):((short_GI_20)?578:520);
+				max_rate = (bw_40MHz) ? ((short_GI_40) ? 1200 : 1080) :
+					((short_GI_20) ? 578 : 520);
 			else if (mcs->rx_mask[0] & BIT(4))
-				max_rate = (bw_40MHz) ? ((short_GI_40)?900:810):((short_GI_20)?433:390);
+				max_rate = (bw_40MHz) ? ((short_GI_40) ? 900 : 810) :
+					((short_GI_20) ? 433 : 390);
 			else if (mcs->rx_mask[0] & BIT(3))
-				max_rate = (bw_40MHz) ? ((short_GI_40)?600:540):((short_GI_20)?289:260);
+				max_rate = (bw_40MHz) ? ((short_GI_40) ? 600 : 540) :
+					((short_GI_20) ? 289 : 260);
 			else if (mcs->rx_mask[0] & BIT(2))
-				max_rate = (bw_40MHz) ? ((short_GI_40)?450:405):((short_GI_20)?217:195);
+				max_rate = (bw_40MHz) ? ((short_GI_40) ? 450 : 405) :
+					((short_GI_20) ? 217 : 195);
 			else if (mcs->rx_mask[0] & BIT(1))
-				max_rate = (bw_40MHz) ? ((short_GI_40)?300:270):((short_GI_20)?144:130);
+				max_rate = (bw_40MHz) ? ((short_GI_40) ? 300 : 270) :
+					((short_GI_20) ? 144 : 130);
 			else if (mcs->rx_mask[0] & BIT(0))
-				max_rate = (bw_40MHz) ? ((short_GI_40)?150:135):((short_GI_20)?72:65);
+				max_rate = (bw_40MHz) ? ((short_GI_40) ? 150 : 135) :
+					((short_GI_20) ? 72 : 65);
 		}
 	}
 	return max_rate;
-- 
1.7.9.5


             reply	other threads:[~2015-11-11 21:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11  7:48 Marcos Oviedo [this message]
2015-11-11 22:12 ` [PATCH] Staging: R8723au: rtw_ieee80211: Fixing code style space issues Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447228118-18609-1-git-send-email-devkerp@gmail.com \
    --to=devkerp@gmail.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.