[PATCH] staging: rtl8723bs: remove unnecessary void * cast in odm_DynamicTxPower.c

Tomasz Unger posted 1 patch 1 month, 1 week ago
drivers/staging/rtl8723bs/hal/odm_DynamicTxPower.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] staging: rtl8723bs: remove unnecessary void * cast in odm_DynamicTxPower.c
Posted by Tomasz Unger 1 month, 1 week ago
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language, so the explicit cast
from pDM_VOID to struct dm_odm_t * is unnecessary.

Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl>
---
Verified with checkpatch.pl - no errors or warnings.
Compiled the rtl8723bs module successfully with CONFIG_RTL8723BS=m.
Module loads without errors in a QEMU environment (verified via
insmod and lsmod). This confirms the module loads cleanly but does
not exercise the changed code path, which would require the actual
RTL8723BS hardware.
---
 drivers/staging/rtl8723bs/hal/odm_DynamicTxPower.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm_DynamicTxPower.c b/drivers/staging/rtl8723bs/hal/odm_DynamicTxPower.c
index 398dfa13449d..d33103dd63e7 100644
--- a/drivers/staging/rtl8723bs/hal/odm_DynamicTxPower.c
+++ b/drivers/staging/rtl8723bs/hal/odm_DynamicTxPower.c
@@ -9,7 +9,7 @@
 
 void odm_DynamicTxPowerInit(void *pDM_VOID)
 {
-	struct dm_odm_t *pDM_Odm = (struct dm_odm_t *)pDM_VOID;
+	struct dm_odm_t *pDM_Odm = pDM_VOID;
 
 	struct adapter *Adapter = pDM_Odm->Adapter;
 	struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);

---
base-commit: 8d3ae59288f1e7d58d76558a6ee96d533bc5019f
change-id: 20260817-rtl8723bs-void-cast-txpower-59989a509967

Best regards,
--  
Tomasz Unger <tomasz.unger@yahoo.pl>