* [PATCH 0/6] staging: r8188eu: cleanup
@ 2022-04-02 8:50 Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 1/6] staging: r8188eu: place constants on the right side of tests Rebecca Mckeever
` (5 more replies)
0 siblings, 6 replies; 11+ messages in thread
From: Rebecca Mckeever @ 2022-04-02 8:50 UTC (permalink / raw)
To: outreachy
Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman, linux-staging,
linux-kernel, Rebecca Mckeever
These patches address style issues found by checkpatch.
Rebecca Mckeever (6):
staging: r8188eu: place constants on the right side of tests
staging: r8188eu: remove else after return
staging: r8188eu: correct misspelling in comment "conider" ->
"consider"
staging: r8188eu: format block comments
staging: r8188eu: remove unnecessary braces in conditional statements
staging: r8188eu: remove spaces before tabs
drivers/staging/r8188eu/core/rtw_cmd.c | 70 +++++++++++++-------------
1 file changed, 34 insertions(+), 36 deletions(-)
--
2.32.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/6] staging: r8188eu: place constants on the right side of tests
2022-04-02 8:50 [PATCH 0/6] staging: r8188eu: cleanup Rebecca Mckeever
@ 2022-04-02 8:50 ` Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 2/6] staging: r8188eu: remove else after return Rebecca Mckeever
` (4 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Rebecca Mckeever @ 2022-04-02 8:50 UTC (permalink / raw)
To: outreachy
Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman, linux-staging,
linux-kernel, Rebecca Mckeever
Conform to Linux kernel coding style.
Reported by checkpatch:
WARNING: Comparisons should place the constant on the right side of the test
Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
---
drivers/staging/r8188eu/core/rtw_cmd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index 4fda2fe07ecc..3b282c387282 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -189,7 +189,7 @@ u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
cmd_obj->padapter = padapter;
res = rtw_cmd_filter(pcmdpriv, cmd_obj);
- if (_FAIL == res) {
+ if (res == _FAIL) {
rtw_free_cmd_obj(cmd_obj);
goto exit;
}
@@ -260,7 +260,7 @@ int rtw_cmd_thread(void *context)
if (!pcmd)
continue;
- if (_FAIL == rtw_cmd_filter(pcmdpriv, pcmd)) {
+ if (rtw_cmd_filter(pcmdpriv, pcmd) == _FAIL) {
pcmd->res = H2C_DROPPED;
goto post_process;
}
@@ -613,7 +613,7 @@ u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, bool enqueu
res = rtw_enqueue_cmd(cmdpriv, cmdobj);
} else {
/* no need to enqueue, do the cmd hdl directly and free cmd parameter */
- if (H2C_SUCCESS != disconnect_hdl(padapter, (u8 *)param))
+ if (disconnect_hdl(padapter, (u8 *)param) != H2C_SUCCESS)
res = _FAIL;
kfree(param);
}
--
2.32.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/6] staging: r8188eu: remove else after return
2022-04-02 8:50 [PATCH 0/6] staging: r8188eu: cleanup Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 1/6] staging: r8188eu: place constants on the right side of tests Rebecca Mckeever
@ 2022-04-02 8:50 ` Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 3/6] staging: r8188eu: correct misspelling in comment "conider" -> "consider" Rebecca Mckeever
` (3 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Rebecca Mckeever @ 2022-04-02 8:50 UTC (permalink / raw)
To: outreachy
Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman, linux-staging,
linux-kernel, Rebecca Mckeever
Conform to Linux kernel coding style.
Reported by checkpatch:
WARNING: else is not generally useful after a break or return
Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
---
drivers/staging/r8188eu/core/rtw_cmd.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index 3b282c387282..09fde5b23ce2 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -1427,8 +1427,10 @@ void rtw_disassoc_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
spin_unlock_bh(&pmlmepriv->lock);
return;
- } else /* clear bridge database */
- nat25_db_cleanup(padapter);
+ }
+
+ /* clear bridge database */
+ nat25_db_cleanup(padapter);
/* free cmd */
rtw_free_cmd_obj(pcmd);
--
2.32.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/6] staging: r8188eu: correct misspelling in comment "conider" -> "consider"
2022-04-02 8:50 [PATCH 0/6] staging: r8188eu: cleanup Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 1/6] staging: r8188eu: place constants on the right side of tests Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 2/6] staging: r8188eu: remove else after return Rebecca Mckeever
@ 2022-04-02 8:50 ` Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 4/6] staging: r8188eu: format block comments Rebecca Mckeever
` (2 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Rebecca Mckeever @ 2022-04-02 8:50 UTC (permalink / raw)
To: outreachy
Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman, linux-staging,
linux-kernel, Rebecca Mckeever
Correct spelling typo. Reported by checkpatch:
CHECK: 'conider' may be misspelled - perhaps 'consider'?
Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
---
drivers/staging/r8188eu/core/rtw_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index 09fde5b23ce2..2e135bbd836a 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -293,7 +293,7 @@ int rtw_cmd_thread(void *context)
rtw_free_cmd_obj(pcmd);
else
/* todo: !!! fill rsp_buf to pcmd->rsp if (pcmd->rsp!= NULL) */
- pcmd_callback(pcmd->padapter, pcmd);/* need conider that free cmd_obj in rtw_cmd_callback */
+ pcmd_callback(pcmd->padapter, pcmd);/* need consider that free cmd_obj in rtw_cmd_callback */
} else {
rtw_free_cmd_obj(pcmd);
}
--
2.32.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/6] staging: r8188eu: format block comments
2022-04-02 8:50 [PATCH 0/6] staging: r8188eu: cleanup Rebecca Mckeever
` (2 preceding siblings ...)
2022-04-02 8:50 ` [PATCH 3/6] staging: r8188eu: correct misspelling in comment "conider" -> "consider" Rebecca Mckeever
@ 2022-04-02 8:50 ` Rebecca Mckeever
2022-04-02 16:37 ` Larry Finger
2022-04-02 8:50 ` [PATCH 5/6] staging: r8188eu: remove unnecessary braces in conditional statements Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 6/6] staging: r8188eu: remove spaces before tabs Rebecca Mckeever
5 siblings, 1 reply; 11+ messages in thread
From: Rebecca Mckeever @ 2022-04-02 8:50 UTC (permalink / raw)
To: outreachy
Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman, linux-staging,
linux-kernel, Rebecca Mckeever
Add ' * ' or ' ' to beginning of block comment lines
to conform to Linux kernel coding style.
Reported by checkpatch:
WARNING: Block comments use * on subsequent lines
Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
---
drivers/staging/r8188eu/core/rtw_cmd.c | 29 +++++++++++++-------------
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index 2e135bbd836a..0c659b40aa1c 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -12,9 +12,9 @@
#include "../include/rtl8188e_dm.h"
/*
-Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
-No irqsave is necessary.
-*/
+ * Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
+ * No irqsave is necessary.
+ */
static int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
{
@@ -97,14 +97,13 @@ static void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
}
/*
-Calling Context:
-
-rtw_enqueue_cmd can only be called between kernel thread,
-since only spin_lock is used.
-
-ISR/Call-Back functions can't call this sub-function.
-
-*/
+ * Calling Context:
+ *
+ * rtw_enqueue_cmd can only be called between kernel thread,
+ * since only spin_lock is used.
+ *
+ * ISR/Call-Back functions can't call this sub-function.
+ */
static int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
{
@@ -319,10 +318,10 @@ int rtw_cmd_thread(void *context)
}
/*
-rtw_sitesurvey_cmd(~)
- ### NOTE:#### (!!!!)
- MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, YOU SHOULD HAVE LOCKED pmlmepriv->lock
-*/
+ * rtw_sitesurvey_cmd(~)
+ * ### NOTE:#### (!!!!)
+ * MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, YOU SHOULD HAVE LOCKED pmlmepriv->lock
+ */
u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, int ssid_num,
struct rtw_ieee80211_channel *ch, int ch_num)
{
--
2.32.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/6] staging: r8188eu: remove unnecessary braces in conditional statements
2022-04-02 8:50 [PATCH 0/6] staging: r8188eu: cleanup Rebecca Mckeever
` (3 preceding siblings ...)
2022-04-02 8:50 ` [PATCH 4/6] staging: r8188eu: format block comments Rebecca Mckeever
@ 2022-04-02 8:50 ` Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 6/6] staging: r8188eu: remove spaces before tabs Rebecca Mckeever
5 siblings, 0 replies; 11+ messages in thread
From: Rebecca Mckeever @ 2022-04-02 8:50 UTC (permalink / raw)
To: outreachy
Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman, linux-staging,
linux-kernel, Rebecca Mckeever
Conform to Linux kernel coding style.
Reported by checkpatch:
WARNING: braces {} are not necessary for single statement blocks
WARNING: braces {} are not necessary for any arm of this statement
Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
---
drivers/staging/r8188eu/core/rtw_cmd.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index 0c659b40aa1c..832bf25b1a83 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -331,13 +331,11 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid,
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
- if (check_fwstate(pmlmepriv, _FW_LINKED)) {
+ if (check_fwstate(pmlmepriv, _FW_LINKED))
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SCAN, 1);
- }
- if (check_fwstate(pmlmepriv, _FW_LINKED)) {
+ if (check_fwstate(pmlmepriv, _FW_LINKED))
p2p_ps_wk_cmd(padapter, P2P_PS_SCAN, 1);
- }
ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
if (!ph2c)
@@ -517,11 +515,10 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork)
psecuritypriv->authenticator_ie[0] = (unsigned char)psecnetwork->IELength;
- if (psecnetwork->IELength - 12 < 255) {
+ if (psecnetwork->IELength - 12 < 255)
memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], psecnetwork->IELength - 12);
- } else {
+ else
memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], 255);
- }
psecnetwork->IELength = 0;
/* Added by Albert 2009/02/18 */
--
2.32.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 6/6] staging: r8188eu: remove spaces before tabs
2022-04-02 8:50 [PATCH 0/6] staging: r8188eu: cleanup Rebecca Mckeever
` (4 preceding siblings ...)
2022-04-02 8:50 ` [PATCH 5/6] staging: r8188eu: remove unnecessary braces in conditional statements Rebecca Mckeever
@ 2022-04-02 8:50 ` Rebecca Mckeever
2022-04-02 16:42 ` Larry Finger
2022-04-04 12:16 ` Dan Carpenter
5 siblings, 2 replies; 11+ messages in thread
From: Rebecca Mckeever @ 2022-04-02 8:50 UTC (permalink / raw)
To: outreachy
Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman, linux-staging,
linux-kernel, Rebecca Mckeever
Conform to Linux kernel coding style.
Reported by checkpatch:
WARNING: please, no space before tabs
Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
---
drivers/staging/r8188eu/core/rtw_cmd.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index 832bf25b1a83..8ae25cb4246b 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -548,9 +548,9 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork)
phtpriv->ht_option = false;
if (pregistrypriv->ht_enable) {
- /* Added by Albert 2010/06/23 */
- /* For the WEP mode, we will use the bg mode to do the connection to avoid some IOT issue. */
- /* Especially for Realtek 8192u SoftAP. */
+ /* Added by Albert 2010/06/23 */
+ /* For the WEP mode, we will use the bg mode to do the connection to avoid some IOT issue. */
+ /* Especially for Realtek 8192u SoftAP. */
if ((padapter->securitypriv.dot11PrivacyAlgrthm != _WEP40_) &&
(padapter->securitypriv.dot11PrivacyAlgrthm != _WEP104_) &&
(padapter->securitypriv.dot11PrivacyAlgrthm != _TKIP_)) {
@@ -1010,7 +1010,7 @@ u8 rtw_lps_ctrl_wk_cmd(struct adapter *padapter, u8 lps_ctrl_type, u8 enqueue)
u8 res = _SUCCESS;
/* if (!pwrctrlpriv->bLeisurePs) */
- /* return res; */
+ /* return res; */
if (enqueue) {
ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
@@ -1151,8 +1151,8 @@ u8 p2p_protocol_wk_cmd(struct adapter *padapter, int intCmdType)
}
pdrvextra_cmd_parm->ec_id = P2P_PROTO_WK_CID;
- pdrvextra_cmd_parm->type_size = intCmdType; /* As the command tppe. */
- pdrvextra_cmd_parm->pbuf = NULL; /* Must be NULL here */
+ pdrvextra_cmd_parm->type_size = intCmdType; /* As the command tppe. */
+ pdrvextra_cmd_parm->pbuf = NULL; /* Must be NULL here */
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
@@ -1378,8 +1378,8 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf)
p2p_ps_wk_hdl(padapter, pdrvextra_cmd->type_size);
break;
case P2P_PROTO_WK_CID:
- /* Commented by Albert 2011/07/01 */
- /* I used the type_size as the type command */
+ /* Commented by Albert 2011/07/01 */
+ /* I used the type_size as the type command */
p2p_protocol_wk_hdl(padapter, pdrvextra_cmd->type_size);
break;
case CHECK_HIQ_WK_CID:
--
2.32.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 4/6] staging: r8188eu: format block comments
2022-04-02 8:50 ` [PATCH 4/6] staging: r8188eu: format block comments Rebecca Mckeever
@ 2022-04-02 16:37 ` Larry Finger
2022-04-03 4:55 ` Rebecca Mckeever
0 siblings, 1 reply; 11+ messages in thread
From: Larry Finger @ 2022-04-02 16:37 UTC (permalink / raw)
To: Rebecca Mckeever, outreachy
Cc: Phillip Potter, Greg Kroah-Hartman, linux-staging, linux-kernel
On 4/2/22 03:50, Rebecca Mckeever wrote:
> Add ' * ' or ' ' to beginning of block comment lines
> to conform to Linux kernel coding style.
>
> Reported by checkpatch:
>
> WARNING: Block comments use * on subsequent lines
>
> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
> ---
> drivers/staging/r8188eu/core/rtw_cmd.c | 29 +++++++++++++-------------
> 1 file changed, 14 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
> index 2e135bbd836a..0c659b40aa1c 100644
> --- a/drivers/staging/r8188eu/core/rtw_cmd.c
> +++ b/drivers/staging/r8188eu/core/rtw_cmd.c
> @@ -12,9 +12,9 @@
> #include "../include/rtl8188e_dm.h"
>
> /*
> -Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
> -No irqsave is necessary.
> -*/
> + * Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
> + * No irqsave is necessary.
> + */
>
> static int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
> {
> @@ -97,14 +97,13 @@ static void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
> }
>
> /*
> -Calling Context:
> -
> -rtw_enqueue_cmd can only be called between kernel thread,
> -since only spin_lock is used.
> -
> -ISR/Call-Back functions can't call this sub-function.
> -
> -*/
> + * Calling Context:
> + *
> + * rtw_enqueue_cmd can only be called between kernel thread,
> + * since only spin_lock is used.
> + *
> + * ISR/Call-Back functions can't call this sub-function.
> + */
>
> static int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
> {
> @@ -319,10 +318,10 @@ int rtw_cmd_thread(void *context)
> }
>
> /*
> -rtw_sitesurvey_cmd(~)
> - ### NOTE:#### (!!!!)
> - MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, YOU SHOULD HAVE LOCKED pmlmepriv->lock
> -*/
> + * rtw_sitesurvey_cmd(~)
> + * ### NOTE:#### (!!!!)
> + * MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, YOU SHOULD HAVE LOCKED pmlmepriv->lock
> + */
> u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, int ssid_num,
> struct rtw_ieee80211_channel *ch, int ch_num)
> {
These changes are OK, but the rules in drivers/net/wireless specify using
/* abcd
rather than
/*
* abcd
Thus, if and when this driver is accepted into the drivers/net/wireless tree,
another change will be needed. I suggest doing that now.
Larry
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 6/6] staging: r8188eu: remove spaces before tabs
2022-04-02 8:50 ` [PATCH 6/6] staging: r8188eu: remove spaces before tabs Rebecca Mckeever
@ 2022-04-02 16:42 ` Larry Finger
2022-04-04 12:16 ` Dan Carpenter
1 sibling, 0 replies; 11+ messages in thread
From: Larry Finger @ 2022-04-02 16:42 UTC (permalink / raw)
To: Rebecca Mckeever, outreachy
Cc: Phillip Potter, Greg Kroah-Hartman, linux-staging, linux-kernel
On 4/2/22 03:50, Rebecca Mckeever wrote:
> Conform to Linux kernel coding style.
>
> Reported by checkpatch:
>
> WARNING: please, no space before tabs
>
> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
> ---
> drivers/staging/r8188eu/core/rtw_cmd.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
> index 832bf25b1a83..8ae25cb4246b 100644
> --- a/drivers/staging/r8188eu/core/rtw_cmd.c
> +++ b/drivers/staging/r8188eu/core/rtw_cmd.c
> @@ -548,9 +548,9 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork)
>
> phtpriv->ht_option = false;
> if (pregistrypriv->ht_enable) {
> - /* Added by Albert 2010/06/23 */
> - /* For the WEP mode, we will use the bg mode to do the connection to avoid some IOT issue. */
> - /* Especially for Realtek 8192u SoftAP. */
> + /* Added by Albert 2010/06/23 */
> + /* For the WEP mode, we will use the bg mode to do the connection to avoid some IOT issue. */
> + /* Especially for Realtek 8192u SoftAP. */
> if ((padapter->securitypriv.dot11PrivacyAlgrthm != _WEP40_) &&
> (padapter->securitypriv.dot11PrivacyAlgrthm != _WEP104_) &&
> (padapter->securitypriv.dot11PrivacyAlgrthm != _TKIP_)) {
> @@ -1010,7 +1010,7 @@ u8 rtw_lps_ctrl_wk_cmd(struct adapter *padapter, u8 lps_ctrl_type, u8 enqueue)
> u8 res = _SUCCESS;
>
> /* if (!pwrctrlpriv->bLeisurePs) */
> - /* return res; */
> + /* return res; */
>
> if (enqueue) {
> ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
> @@ -1151,8 +1151,8 @@ u8 p2p_protocol_wk_cmd(struct adapter *padapter, int intCmdType)
> }
>
> pdrvextra_cmd_parm->ec_id = P2P_PROTO_WK_CID;
> - pdrvextra_cmd_parm->type_size = intCmdType; /* As the command tppe. */
> - pdrvextra_cmd_parm->pbuf = NULL; /* Must be NULL here */
> + pdrvextra_cmd_parm->type_size = intCmdType; /* As the command tppe. */
> + pdrvextra_cmd_parm->pbuf = NULL; /* Must be NULL here */
>
> init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
>
> @@ -1378,8 +1378,8 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf)
> p2p_ps_wk_hdl(padapter, pdrvextra_cmd->type_size);
> break;
> case P2P_PROTO_WK_CID:
> - /* Commented by Albert 2011/07/01 */
> - /* I used the type_size as the type command */
> + /* Commented by Albert 2011/07/01 */
> + /* I used the type_size as the type command */
> p2p_protocol_wk_hdl(padapter, pdrvextra_cmd->type_size);
> break;
> case CHECK_HIQ_WK_CID:
Congratulations on a very clear set of patches. Each performs a single change
exactly as required by the rules.
For all 6,
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Thanks,
Larry
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/6] staging: r8188eu: format block comments
2022-04-02 16:37 ` Larry Finger
@ 2022-04-03 4:55 ` Rebecca Mckeever
0 siblings, 0 replies; 11+ messages in thread
From: Rebecca Mckeever @ 2022-04-03 4:55 UTC (permalink / raw)
To: Larry Finger
Cc: outreachy, Phillip Potter, Greg Kroah-Hartman, linux-staging,
linux-kernel
Hi Larry,
On Sat, Apr 02, 2022 at 11:37:27AM -0500, Larry Finger wrote:
> On 4/2/22 03:50, Rebecca Mckeever wrote:
> > Add ' * ' or ' ' to beginning of block comment lines
> > to conform to Linux kernel coding style.
> >
> > Reported by checkpatch:
> >
> > WARNING: Block comments use * on subsequent lines
> >
> > Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
> > ---
> > drivers/staging/r8188eu/core/rtw_cmd.c | 29 +++++++++++++-------------
> > 1 file changed, 14 insertions(+), 15 deletions(-)
> >
> > diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
> > index 2e135bbd836a..0c659b40aa1c 100644
> > --- a/drivers/staging/r8188eu/core/rtw_cmd.c
> > +++ b/drivers/staging/r8188eu/core/rtw_cmd.c
> > @@ -12,9 +12,9 @@
> > #include "../include/rtl8188e_dm.h"
> > /*
> > -Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
> > -No irqsave is necessary.
> > -*/
> > + * Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
> > + * No irqsave is necessary.
> > + */
> > static int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
> > {
> > @@ -97,14 +97,13 @@ static void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
> > }
> > /*
> > -Calling Context:
> > -
> > -rtw_enqueue_cmd can only be called between kernel thread,
> > -since only spin_lock is used.
> > -
> > -ISR/Call-Back functions can't call this sub-function.
> > -
> > -*/
> > + * Calling Context:
> > + *
> > + * rtw_enqueue_cmd can only be called between kernel thread,
> > + * since only spin_lock is used.
> > + *
> > + * ISR/Call-Back functions can't call this sub-function.
> > + */
> > static int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
> > {
> > @@ -319,10 +318,10 @@ int rtw_cmd_thread(void *context)
> > }
> > /*
> > -rtw_sitesurvey_cmd(~)
> > - ### NOTE:#### (!!!!)
> > - MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, YOU SHOULD HAVE LOCKED pmlmepriv->lock
> > -*/
> > + * rtw_sitesurvey_cmd(~)
> > + * ### NOTE:#### (!!!!)
> > + * MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, YOU SHOULD HAVE LOCKED pmlmepriv->lock
> > + */
> > u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, int ssid_num,
> > struct rtw_ieee80211_channel *ch, int ch_num)
> > {
>
> These changes are OK, but the rules in drivers/net/wireless specify using
>
> /* abcd
>
> rather than
>
> /*
> * abcd
>
> Thus, if and when this driver is accepted into the drivers/net/wireless
> tree, another change will be needed. I suggest doing that now.
>
> Larry
To clarify, I should make that change in this file?
And would it be better to make a new patch for it, or make a revision to this patch?
Thanks,
Rebecca
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 6/6] staging: r8188eu: remove spaces before tabs
2022-04-02 8:50 ` [PATCH 6/6] staging: r8188eu: remove spaces before tabs Rebecca Mckeever
2022-04-02 16:42 ` Larry Finger
@ 2022-04-04 12:16 ` Dan Carpenter
1 sibling, 0 replies; 11+ messages in thread
From: Dan Carpenter @ 2022-04-04 12:16 UTC (permalink / raw)
To: Rebecca Mckeever
Cc: outreachy, Larry Finger, Phillip Potter, Greg Kroah-Hartman,
linux-staging, linux-kernel
On Sat, Apr 02, 2022 at 03:50:48AM -0500, Rebecca Mckeever wrote:
> Conform to Linux kernel coding style.
>
> Reported by checkpatch:
>
> WARNING: please, no space before tabs
>
> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
> ---
> drivers/staging/r8188eu/core/rtw_cmd.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
> index 832bf25b1a83..8ae25cb4246b 100644
> --- a/drivers/staging/r8188eu/core/rtw_cmd.c
> +++ b/drivers/staging/r8188eu/core/rtw_cmd.c
> @@ -548,9 +548,9 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork)
>
> phtpriv->ht_option = false;
> if (pregistrypriv->ht_enable) {
> - /* Added by Albert 2010/06/23 */
> - /* For the WEP mode, we will use the bg mode to do the connection to avoid some IOT issue. */
> - /* Especially for Realtek 8192u SoftAP. */
> + /* Added by Albert 2010/06/23 */
In follow on patches you can delete these sorts of "Added by Albert 2010"
comments.
> + /* For the WEP mode, we will use the bg mode to do the connection to avoid some IOT issue. */
> + /* Especially for Realtek 8192u SoftAP. */
> if ((padapter->securitypriv.dot11PrivacyAlgrthm != _WEP40_) &&
> (padapter->securitypriv.dot11PrivacyAlgrthm != _WEP104_) &&
> (padapter->securitypriv.dot11PrivacyAlgrthm != _TKIP_)) {
> @@ -1010,7 +1010,7 @@ u8 rtw_lps_ctrl_wk_cmd(struct adapter *padapter, u8 lps_ctrl_type, u8 enqueue)
> u8 res = _SUCCESS;
>
> /* if (!pwrctrlpriv->bLeisurePs) */
> - /* return res; */
> + /* return res; */
And this commented out code.
>
> if (enqueue) {
> ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
> @@ -1151,8 +1151,8 @@ u8 p2p_protocol_wk_cmd(struct adapter *padapter, int intCmdType)
> }
>
> pdrvextra_cmd_parm->ec_id = P2P_PROTO_WK_CID;
> - pdrvextra_cmd_parm->type_size = intCmdType; /* As the command tppe. */
> - pdrvextra_cmd_parm->pbuf = NULL; /* Must be NULL here */
> + pdrvextra_cmd_parm->type_size = intCmdType; /* As the command tppe. */
^
s/tppe/type/. It's noting the "size = type". (Which is an ugly hack).
regards,
dan carpenter
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-04-04 12:17 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-02 8:50 [PATCH 0/6] staging: r8188eu: cleanup Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 1/6] staging: r8188eu: place constants on the right side of tests Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 2/6] staging: r8188eu: remove else after return Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 3/6] staging: r8188eu: correct misspelling in comment "conider" -> "consider" Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 4/6] staging: r8188eu: format block comments Rebecca Mckeever
2022-04-02 16:37 ` Larry Finger
2022-04-03 4:55 ` Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 5/6] staging: r8188eu: remove unnecessary braces in conditional statements Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 6/6] staging: r8188eu: remove spaces before tabs Rebecca Mckeever
2022-04-02 16:42 ` Larry Finger
2022-04-04 12:16 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).