From: John Whitmore <johnfwhitmore@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org,
aastha.gupta4104@gmail.com, keescook@chromium.org,
pombredanne@nexb.com, kstewart@linuxfoundation.org,
tglx@linutronix.de, John Whitmore <johnfwhitmore@gmail.com>
Subject: [PATCH 09/12] staging:rtl8192u: Move trailing conditional statement to the following line
Date: Sat, 7 Jul 2018 15:55:10 +0100 [thread overview]
Message-ID: <20180707145513.15325-9-johnfwhitmore@gmail.com> (raw)
In-Reply-To: <20180707145513.15325-1-johnfwhitmore@gmail.com>
Coding standard requires that the conditional statement is not on the same
line as the 'if' or 'else' but on the following line. Statements moved
accordingly.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
.../rtl8192u/ieee80211/ieee80211_softmac.c | 25 +++++++++++++------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index 6d62fc1b249c..7bc2e94792ca 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -622,7 +622,8 @@ ieee80211_authentication_req(struct ieee80211_network *beacon,
int len = sizeof(struct ieee80211_authentication) + challengelen + ieee->tx_headroom;
skb = dev_alloc_skb(len);
- if (!skb) return NULL;
+ if (!skb)
+ return NULL;
skb_reserve(skb, ieee->tx_headroom);
auth = skb_put(skb, sizeof(struct ieee80211_authentication));
@@ -680,7 +681,8 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d
u8 *tmp_generic_ie_buf = NULL;
u8 tmp_generic_ie_len = 0;
- if (rate_ex_len > 0) rate_ex_len += 2;
+ if (rate_ex_len > 0)
+ rate_ex_len += 2;
if (ieee->current_network.capability & WLAN_CAPABILITY_IBSS)
atim_len = 4;
@@ -834,7 +836,8 @@ static struct sk_buff *ieee80211_assoc_resp(struct ieee80211_device *ieee,
if (ieee->host_encrypt)
crypt = ieee->crypt[ieee->tx_keyidx];
- else crypt = NULL;
+ else
+ crypt = NULL;
encrypt = crypt && crypt->ops;
@@ -843,8 +846,10 @@ static struct sk_buff *ieee80211_assoc_resp(struct ieee80211_device *ieee,
assoc->status = 0;
assoc->aid = cpu_to_le16(ieee->assoc_id);
- if (ieee->assoc_id == 0x2007) ieee->assoc_id = 0;
- else ieee->assoc_id++;
+ if (ieee->assoc_id == 0x2007)
+ ieee->assoc_id = 0;
+ else
+ ieee->assoc_id++;
tag = skb_put(skb, rate_len);
@@ -1529,9 +1534,12 @@ static short probe_rq_parse(struct ieee80211_device *ieee, struct sk_buff *skb,
}
//IEEE80211DMESG("Card MAC address is "MACSTR, MAC2STR(src));
- if (ssidlen == 0) return 1;
+ if (ssidlen == 0)
+ return 1;
+
+ if (!ssid)
+ return 1; /* ssid not found in tagged param */
- if (!ssid) return 1; /* ssid not found in tagged param */
return (!strncmp(ssid, ieee->current_network.ssid, ssidlen));
}
@@ -2115,7 +2123,8 @@ void ieee80211_wake_queue(struct ieee80211_device *ieee)
struct rtl_80211_hdr_3addr *header;
spin_lock_irqsave(&ieee->lock, flags);
- if (!ieee->queue_stop) goto exit;
+ if (!ieee->queue_stop)
+ goto exit;
ieee->queue_stop = 0;
--
2.18.0
next prev parent reply other threads:[~2018-07-07 14:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-07 14:55 [PATCH 01/12] staging:rtl8192u: rename HT_CHANNEL_WIDTH -> enum ht_channel_width John Whitmore
2018-07-07 14:55 ` [PATCH 02/12] staging:rtl8192u: Add space required before '(' - Style John Whitmore
2018-07-07 14:55 ` [PATCH 03/12] staging:rtl8192u: Remove blank lines before '}' and after '{' characters John Whitmore
2018-07-08 15:38 ` Greg KH
2018-07-08 16:18 ` John Whitmore
2018-07-09 9:29 ` John Whitmore
2018-07-09 12:04 ` Greg KH
2018-07-07 14:55 ` [PATCH 04/12] staging:rtl8192u: Add spaces required around operators - Coding Style John Whitmore
2018-07-07 14:55 ` [PATCH 05/12] staging:rtl8192u: Correct indentation and spacing for braces of code blocks John Whitmore
2018-07-07 14:55 ` [PATCH 06/12] staging:rtl8192u: rename HT_EXTCHNL_OFFSET -> enum ht_extension_chan_width John Whitmore
2018-07-07 14:55 ` [PATCH 07/12] staging:rtl8192u: Correct spacing before and after parenthesis - Style John Whitmore
2018-07-07 14:55 ` [PATCH 08/12] staging:rtl8192u: Remove prohibited spaces - Coding Style John Whitmore
2018-07-07 14:55 ` John Whitmore [this message]
2018-07-07 14:55 ` [PATCH 10/12] staging:rtl8192u: Remove unnecessary parentheses " John Whitmore
2018-07-07 14:55 ` [PATCH 11/12] staging:rtl8192u: Correct indentation of ieee80211_softmac_new_net() John Whitmore
2018-07-07 14:55 ` [PATCH 12/12] staging:rtl8192u: Correction of indentation issues - Coding Style John Whitmore
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=20180707145513.15325-9-johnfwhitmore@gmail.com \
--to=johnfwhitmore@gmail.com \
--cc=aastha.gupta4104@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pombredanne@nexb.com \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox