Re: [PATCH v2] staging: rtl8192e: remove necessary braces for single statement blocks

From: Christophe JAILLET
Date: Sun Oct 09 2022 - 11:18:12 EST


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@xxxxxxxxx>
---
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:

[...]