Skip to contentSkip to conversation

staging: rtl8723bs: remove unused offset in phase 2 _BlockWrite()

PATCH In review Robertus Diawan Chris 3 participants 3 messages Apr 20 – Apr 21 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: remove unused offset in phase 2 _BlockWrite()

Commit c1314fe4d28f ("staging: rtl8723bs: remove all RT_TRACE logs in hal/ and os_dep/") removed the unnecessary RT_TRACE logs in hal/ and os_dep/ files, but left the variable "offset" in the Phase 2 _BlockWrite() function unused, so delete it.

This is reported by Coverity Scan with CID 1408950 as UNUSED_VALUE.

---
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -2
index e794fe3caf9d..988829d5f3c3 100644
@@ -68,8 +68,6 @@ static int _BlockWrite(struct adapter *padapter, void *buffer, u32 buffSize)
 
 	/* 3 Phase #2 */
 	if (remainSize_p1) {
-		offset = blockCount_p1 * blockSize_p1;
-
 		blockCount_p2 = remainSize_p1/blockSize_p2;
 		remainSize_p2 = remainSize_p1%blockSize_p2;
 	}
Signature · 1 line
2.53.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Robertus Diawan Chris

Commit c1314fe4d28f ("staging: rtl8723bs: remove all RT_TRACE logs in hal/ and os_dep/") removed the unnecessary RT_TRACE logs in hal/ and os_dep/ files, but left the variable "offset" in the Phase 2 _BlockWrite() function unused, so delete it.

This is reported by Coverity Scan with CID 1408950 as UNUSED_VALUE.

---

LGTM.

Thanks,

ET

Reviewed-by on v1 1/1
#2 lore raw
In reply to Robertus Diawan Chris
Quoted 17 lines · Robertus Diawan Chris

Commit c1314fe4d28f ("staging: rtl8723bs: remove all RT_TRACE logs in hal/ and os_dep/") removed the unnecessary RT_TRACE logs in hal/ and os_dep/ files, but left the variable "offset" in the Phase 2 _BlockWrite() function unused, so delete it.

This is reported by Coverity Scan with CID 1408950 as UNUSED_VALUE.

---
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -0
index e794fe3caf9d..988829d5f3c3 100644

drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c static int _BlockWrite(struct adapter *padapter, void *buffer, u32 buffSize) · line 73

Quoted 8 lines
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -2
@@ -68,8 +68,6 @@ static int _BlockWrite(struct adapter *padapter, void *buffer, u32 buffSize)
 
 	/* 3 Phase #2 */
 	if (remainSize_p1) {
-		offset = blockCount_p1 * blockSize_p1;
-
 		blockCount_p2 = remainSize_p1/blockSize_p2;
 		remainSize_p2 = remainSize_p1%blockSize_p2;
 	}

LGTM.

Best regards,
Luka Gejak