[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4e40575a308a7fc4ee0d25923097fc915a2ee849.1744285781.git.karanja99erick@gmail.com>
Date: Thu, 10 Apr 2025 16:06:08 +0300
From: Erick Karanja <karanja99erick@...il.com>
To: gregkh@...uxfoundation.org,
outreachy@...ts.linux.dev
Cc: karanja99erick@...il.com,
philipp.g.hortmann@...il.com,
linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/6] staging: rtl8723bs: Initialize variables at declaration in hal_com.c
Make the code more concise and readable by integrating the initialization
directly into the variable declaration in cases where the initialization
is simple and doesn't depend on other variables or complex expressions.
Signed-off-by: Erick Karanja <karanja99erick@...il.com>
---
drivers/staging/rtl8723bs/hal/hal_com.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
index 1213a91cffff..7f4dbd5c5d33 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -745,12 +745,10 @@ u8 GetHalDefVar(
switch (variable) {
case HAL_DEF_UNDERCORATEDSMOOTHEDPWDB:
{
- struct mlme_priv *pmlmepriv;
- struct sta_priv *pstapriv;
+ struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
+ struct sta_priv *pstapriv = &adapter->stapriv;
struct sta_info *psta;
- pmlmepriv = &adapter->mlmepriv;
- pstapriv = &adapter->stapriv;
psta = rtw_get_stainfo(pstapriv, pmlmepriv->cur_network.network.mac_address);
if (psta)
*((int *)value) = psta->rssi_stat.UndecoratedSmoothedPWDB;
--
2.43.0
Powered by blists - more mailing lists