[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <82af6a6042e359c4ab9c2fdbb68cc238f43be857.1744285781.git.karanja99erick@gmail.com>
Date: Thu, 10 Apr 2025 16:06:09 +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 4/6] staging: rtl8723bs: Initialize variables at declaration in sdio_halinit.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/sdio_halinit.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index af9a2b068796..cfc4cace6bb9 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -453,11 +453,8 @@ static void _InitRetryFunction(struct adapter *padapter)
static void HalRxAggr8723BSdio(struct adapter *padapter)
{
- u8 valueDMATimeout;
- u8 valueDMAPageCount;
-
- valueDMATimeout = 0x06;
- valueDMAPageCount = 0x06;
+ u8 valueDMATimeout = 0x06;
+ u8 valueDMAPageCount = 0x06;
rtw_write8(padapter, REG_RXDMA_AGG_PG_TH + 1, valueDMATimeout);
rtw_write8(padapter, REG_RXDMA_AGG_PG_TH, valueDMAPageCount);
@@ -498,11 +495,9 @@ static void _initSdioAggregationSetting(struct adapter *padapter)
static void _InitOperationMode(struct adapter *padapter)
{
- struct mlme_ext_priv *pmlmeext;
+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
u8 regBwOpMode = 0;
- pmlmeext = &padapter->mlmeextpriv;
-
/* 1 This part need to modified according to the rate set we filtered!! */
/* */
/* Set RRSR, RATR, and REG_BWOPMODE registers */
--
2.43.0
Powered by blists - more mailing lists