All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Straube <straube.linux@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
	martin@kaiser.cx, fmdefrancesco@gmail.com,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Michael Straube <straube.linux@gmail.com>
Subject: [PATCH 04/23] staging: r8188eu: clean up spacing style issues in core/rtw_cmd.c
Date: Mon, 16 Aug 2021 17:57:59 +0200	[thread overview]
Message-ID: <20210816155818.24005-5-straube.linux@gmail.com> (raw)
In-Reply-To: <20210816155818.24005-1-straube.linux@gmail.com>

Clean up spacing style issues in core/rtw_cmd.c reported by checkpatch.

CHECK: spaces preferred around that ...
CHECK: No space is necessary after a cast
WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_cmd.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index 65ca4a2895f8..7c640c8148f6 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -16,7 +16,7 @@ Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
 No irqsave is necessary.
 */
 
-int	_rtw_init_cmd_priv (struct	cmd_priv *pcmdpriv)
+int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
 {
 	int res = _SUCCESS;
 
@@ -38,7 +38,7 @@ int	_rtw_init_cmd_priv (struct	cmd_priv *pcmdpriv)
 		goto exit;
 	}
 
-	pcmdpriv->cmd_buf = pcmdpriv->cmd_allocated_buf  +  CMDBUFF_ALIGN_SZ - ((size_t)(pcmdpriv->cmd_allocated_buf) & (CMDBUFF_ALIGN_SZ-1));
+	pcmdpriv->cmd_buf = pcmdpriv->cmd_allocated_buf  +  CMDBUFF_ALIGN_SZ - ((size_t)(pcmdpriv->cmd_allocated_buf) & (CMDBUFF_ALIGN_SZ - 1));
 
 	pcmdpriv->rsp_allocated_buf = kzalloc(MAX_RSPSZ + 4, GFP_KERNEL);
 
@@ -69,7 +69,7 @@ int _rtw_init_evt_priv(struct evt_priv *pevtpriv)
 
 	_init_workitem(&pevtpriv->c2h_wk, c2h_wk_callback, NULL);
 	pevtpriv->c2h_wk_alive = false;
-	pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN+1);
+	pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN + 1);
 
 	return res;
 }
@@ -87,7 +87,7 @@ void rtw_free_evt_priv(struct	evt_priv *pevtpriv)
 	}
 }
 
-void _rtw_free_cmd_priv (struct	cmd_priv *pcmdpriv)
+void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
 {
 
 	if (pcmdpriv) {
@@ -149,12 +149,12 @@ u32	rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
 {
 	u32	res;
 
-	res = _rtw_init_cmd_priv (pcmdpriv);
+	res = _rtw_init_cmd_priv(pcmdpriv);
 
 	return res;
 }
 
-u32	rtw_init_evt_priv (struct	evt_priv *pevtpriv)
+u32 rtw_init_evt_priv(struct evt_priv *pevtpriv)
 {
 	int	res;
 
@@ -801,7 +801,7 @@ u8 rtw_joinbss_cmd(struct adapter  *padapter, struct wlan_network *pnetwork)
 	t_len = sizeof(struct wlan_bssid_ex);
 
 	/* for hidden ap to set fw_state here */
-	if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE)) {
+	if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_ADHOC_STATE)) {
 		switch (ndis_network_mode) {
 		case Ndis802_11IBSS:
 			set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
@@ -832,8 +832,8 @@ u8 rtw_joinbss_cmd(struct adapter  *padapter, struct wlan_network *pnetwork)
 
 	psecuritypriv->authenticator_ie[0] = (unsigned char)psecnetwork->IELength;
 
-	if (psecnetwork->IELength-12 < 255) {
-		memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], psecnetwork->IELength-12);
+	if (psecnetwork->IELength - 12 < 255) {
+		memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], psecnetwork->IELength - 12);
 	} else {
 		memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], 255);
 	}
@@ -1010,7 +1010,7 @@ u8 rtw_setstakey_cmd(struct adapter *padapter, u8 *psta, u8 unicast_key)
 	memcpy(psetstakey_para->addr, sta->hwaddr, ETH_ALEN);
 
 	if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
-		psetstakey_para->algorithm = (unsigned char) psecuritypriv->dot11PrivacyAlgrthm;
+		psetstakey_para->algorithm = (unsigned char)psecuritypriv->dot11PrivacyAlgrthm;
 	else
 		GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, false);
 
-- 
2.32.0


  parent reply	other threads:[~2021-08-16 15:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-16 15:57 [PATCH 00/23] staging: r8188eu: clean up spacing style issues in core dir Michael Straube
2021-08-16 15:57 ` [PATCH 01/23] staging: r8188eu: add spaces around operators in core/rtw_ap.c Michael Straube
2021-08-16 15:57 ` [PATCH 02/23] staging: r8188eu: rewrite subtraction in core/rtw_cmd.c Michael Straube
2021-08-16 15:57 ` [PATCH 03/23] staging: r8188eu: remove unnecessary parentheses " Michael Straube
2021-08-16 15:57 ` Michael Straube [this message]
2021-08-16 15:58 ` [PATCH 05/23] staging: r8188eu: clean up spacing style issues in core/rtw_efuse.c Michael Straube
2021-08-16 15:58 ` [PATCH 06/23] staging: r8188eu: clean up spacing style issues in core/rtw_ieee80211.c Michael Straube
2021-08-16 15:58 ` [PATCH 07/23] staging: r8188eu: simplify multiplication in core/rtw_ioctl_set.c Michael Straube
2021-08-16 15:58 ` [PATCH 08/23] staging: r8188eu: clean up spacing style issues " Michael Straube
2021-08-16 15:58 ` [PATCH 09/23] staging: r8188eu: add spaces around operators in core/rtw_iol.c Michael Straube
2021-08-16 15:58 ` [PATCH 10/23] staging: r8188eu: clean up spacing style issues in core/rtw_mlme.c Michael Straube
2021-08-16 15:58 ` [PATCH 11/23] staging: r8188eu: clean up spacing style issues in core/rtw_mlme_ext.c Michael Straube
2021-08-16 15:58 ` [PATCH 12/23] staging: r8188eu: clean up spacing style issues in core/rtw_mp.c Michael Straube
2021-08-16 15:58 ` [PATCH 13/23] staging: r8188eu: clean up spacing style issues in core/rtw_mp_ioctl.c Michael Straube
2021-08-16 15:58 ` [PATCH 14/23] staging: r8188eu: clean up spacing style issues in core/rtw_p2p.c Michael Straube
2021-08-16 15:58 ` [PATCH 15/23] staging: r8188eu: clean up spacing style issues in core/rtw_pwrctrl.c Michael Straube
2021-08-16 15:58 ` [PATCH 16/23] staging: r8188eu: clean up spacing style issues in core/rtw_recv.c Michael Straube
2021-08-16 15:58 ` [PATCH 17/23] staging: r8188eu: clean up spacing style issues in core/rtw_security.c Michael Straube
2021-08-16 15:58 ` [PATCH 18/23] staging: r8188eu: add spaces around operators in core/rtw_wlan_util.c Michael Straube
2021-08-16 15:58 ` [PATCH 19/23] staging: r8188eu: clean up spacing style issues in core/rtw_xmit.c Michael Straube
2021-08-16 15:58 ` [PATCH 20/23] staging: r8188eu: clean up spacing style issues in core/rtw_debug.c Michael Straube
2021-08-16 15:58 ` [PATCH 21/23] staging: r8188eu: add space around operator in core/rtw_sreset.c Michael Straube
2021-08-16 15:58 ` [PATCH 22/23] staging: r8188eu: clean up spacing style issues in core/rtw_sta_mgt.c Michael Straube
2021-08-16 15:58 ` [PATCH 23/23] staging: r8188eu: add spaces around operators in core/rtw_br_ext.c Michael Straube
2021-08-24  8:58 ` [PATCH 00/23] staging: r8188eu: clean up spacing style issues in core dir Dan Carpenter
2021-08-24 10:25   ` Michael Straube

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=20210816155818.24005-5-straube.linux@gmail.com \
    --to=straube.linux@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=fmdefrancesco@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=martin@kaiser.cx \
    --cc=phil@philpotter.co.uk \
    /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.