* [PATCH v2] staging: rtl8192e: remove necessary braces for single statement blocks
@ 2022-10-09 14:26 Rui Li
2022-10-09 15:18 ` Christophe JAILLET
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Rui Li @ 2022-10-09 14:26 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
This commit cleans up checkpatch warning as follows:
braces {} are not necessary for single statement blocks
Signed-off-by: Rui Li <me@lirui.org>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 3 +--
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 9 +++------
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 12 ++++--------
3 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 18e4e5d84878..8d20b0deca37 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -1112,9 +1112,8 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc,
if (cb_desc->bHwSec) {
static u8 tmp;
- if (!tmp) {
+ if (!tmp)
tmp = 1;
- }
switch (priv->rtllib->pairwise_key_type) {
case KEY_TYPE_WEP40:
case KEY_TYPE_WEP104:
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index 1b592258e640..4e3d183be0f2 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -522,9 +522,8 @@ static bool _rtl92e_bb_config_para_file(struct net_device *dev)
rtStatus = rtl92e_check_bb_and_rf(dev,
(enum hw90_block)eCheckItem,
(enum rf90_radio_path)0);
- if (!rtStatus) {
+ if (!rtStatus)
return rtStatus;
- }
}
rtl92e_set_bb_reg(dev, rFPGA0_RFMOD, bCCKEn|bOFDMEn, 0x0);
_rtl92e_phy_config_bb(dev, BaseBand_Config_PHY_REG);
@@ -1379,9 +1378,8 @@ static bool _rtl92e_set_rf_power_state(struct net_device *dev,
i++;
}
- if (i >= MAX_DOZE_WAITING_TIMES_9x) {
+ if (i >= MAX_DOZE_WAITING_TIMES_9x)
break;
- }
}
rtl92e_set_rf_off(dev);
break;
@@ -1398,9 +1396,8 @@ static bool _rtl92e_set_rf_power_state(struct net_device *dev,
i++;
}
- if (i >= MAX_DOZE_WAITING_TIMES_9x) {
+ if (i >= MAX_DOZE_WAITING_TIMES_9x)
break;
- }
}
if (pPSC->RegRfPsLevel & RT_RF_OFF_LEVL_HALT_NIC &&
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 702551056227..641961a14c52 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -267,9 +267,8 @@ static void _rtl92e_dm_check_ac_dc_power(struct net_device *dev)
"PATH=/usr/bin:/bin",
NULL};
- if (priv->ResetProgress == RESET_TYPE_SILENT) {
+ if (priv->ResetProgress == RESET_TYPE_SILENT)
return;
- }
if (priv->rtllib->state != RTLLIB_LINKED)
return;
@@ -330,9 +329,8 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
bool bshort_gi_enabled = false;
static u8 ping_rssi_state;
- if (!priv->up) {
+ if (!priv->up)
return;
- }
if (pra->rate_adaptive_disabled)
return;
@@ -777,9 +775,8 @@ static void _rtl92e_dm_tx_power_tracking_cb_thermal(struct net_device *dev)
tmpRegA = rtl92e_get_bb_reg(dev, rOFDM0_XATxIQImbalance,
bMaskDWord);
for (i = 0; i < OFDM_Table_Length; i++) {
- if (tmpRegA == OFDMSwingTable[i]) {
+ if (tmpRegA == OFDMSwingTable[i])
priv->OFDM_index[0] = i;
- }
}
TempCCk = rtl92e_get_bb_reg(dev, rCCK0_TxFilter1, bMaskByte2);
@@ -1066,9 +1063,8 @@ void rtl92e_dm_restore_state(struct net_device *dev)
u32 reg_ratr = priv->rate_adaptive.last_ratr;
u32 ratr_value;
- if (!priv->up) {
+ if (!priv->up)
return;
- }
if (priv->rate_adaptive.rate_adaptive_disabled)
return;
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] staging: rtl8192e: remove necessary braces for single statement blocks
2022-10-09 14:26 [PATCH v2] staging: rtl8192e: remove necessary braces for single statement blocks Rui Li
@ 2022-10-09 15:18 ` Christophe JAILLET
2022-10-09 17:49 ` Nam Cao
2022-10-09 18:19 ` Greg Kroah-Hartman
2 siblings, 0 replies; 4+ messages in thread
From: Christophe JAILLET @ 2022-10-09 15:18 UTC (permalink / raw)
To: Rui Li, Greg Kroah-Hartman, linux-staging, linux-kernel
Le 09/10/2022 à 16:26, Rui Li a écrit :
> This commit cleans up checkpatch warning as follows:
> braces {} are not necessary for single statement blocks
>
> Signed-off-by: Rui Li <me@lirui.org>
> ---
> drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 3 +--
> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 9 +++------
> drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 12 ++++--------
> 3 files changed, 8 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> index 18e4e5d84878..8d20b0deca37 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> @@ -1112,9 +1112,8 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc,
> if (cb_desc->bHwSec) {
> static u8 tmp;
>
> - if (!tmp) {
> + if (!tmp)
> tmp = 1;
> - }
Hi, unrelated to this patch, but 'tmp' and the 'if' block' can be
removed as well.
Is is just dead code.
CJ
> switch (priv->rtllib->pairwise_key_type) {
> case KEY_TYPE_WEP40:
> case KEY_TYPE_WEP104:
[...]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] staging: rtl8192e: remove necessary braces for single statement blocks
2022-10-09 14:26 [PATCH v2] staging: rtl8192e: remove necessary braces for single statement blocks Rui Li
2022-10-09 15:18 ` Christophe JAILLET
@ 2022-10-09 17:49 ` Nam Cao
2022-10-09 18:19 ` Greg Kroah-Hartman
2 siblings, 0 replies; 4+ messages in thread
From: Nam Cao @ 2022-10-09 17:49 UTC (permalink / raw)
To: Rui Li; +Cc: Greg Kroah-Hartman, linux-staging, linux-kernel
On Sun, Oct 09, 2022 at 10:26:31PM +0800, Rui Li wrote:
> This commit cleans up checkpatch warning as follows:
> braces {} are not necessary for single statement blocks
>
> Signed-off-by: Rui Li <me@lirui.org>
> ---
> drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 3 +--
> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 9 +++------
> drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 12 ++++--------
> 3 files changed, 8 insertions(+), 16 deletions(-)
Greg expects a change log describing what has changed compared to the
last version. You should send a v3 with a changelog.
Additionally, did you mean "unnecessary" in the title?
Best regards,
Nam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] staging: rtl8192e: remove necessary braces for single statement blocks
2022-10-09 14:26 [PATCH v2] staging: rtl8192e: remove necessary braces for single statement blocks Rui Li
2022-10-09 15:18 ` Christophe JAILLET
2022-10-09 17:49 ` Nam Cao
@ 2022-10-09 18:19 ` Greg Kroah-Hartman
2 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2022-10-09 18:19 UTC (permalink / raw)
To: Rui Li; +Cc: linux-staging, linux-kernel
On Sun, Oct 09, 2022 at 10:26:31PM +0800, Rui Li wrote:
> This commit cleans up checkpatch warning as follows:
> braces {} are not necessary for single statement blocks
>
> Signed-off-by: Rui Li <me@lirui.org>
> ---
> drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 3 +--
> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 9 +++------
> drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 12 ++++--------
> 3 files changed, 8 insertions(+), 16 deletions(-)
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- This looks like a new version of a previously submitted patch, but you
did not list below the --- line any changes from the previous version.
Please read the section entitled "The canonical patch format" in the
kernel file, Documentation/SubmittingPatches for what needs to be done
here to properly describe this.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-09 18:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-09 14:26 [PATCH v2] staging: rtl8192e: remove necessary braces for single statement blocks Rui Li
2022-10-09 15:18 ` Christophe JAILLET
2022-10-09 17:49 ` Nam Cao
2022-10-09 18:19 ` Greg Kroah-Hartman
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).