This series removes unused and/or empty functions from the file
hal/odm_interface.c.
Tested on x86_64 with Inter-Tech DMG-02.
Michael Straube (18):
staging: r8188eu: remove empty ODM_ReleaseTimer()
staging: r8188eu: remove unused ODM_AcquireSpinLock()
staging: r8188eu: remove unused ODM_ReleaseSpinLock()
staging: r8188eu: remove unused ODM_FillH2CCmd()
staging: r8188eu: remove unused ODM_sleep_us()
staging: r8188eu: remove unused ODM_InitializeWorkItem()
staging: r8188eu: remove unused ODM_StartWorkItem()
staging: r8188eu: remove unused ODM_StopWorkItem()
staging: r8188eu: remove unused ODM_FreeWorkItem()
staging: r8188eu: remove unused ODM_ScheduleWorkItem()
staging: r8188eu: remove unused ODM_IsWorkItemScheduled()
staging: r8188eu: remove unused ODM_SetTimer()
staging: r8188eu: remove unused ODM_Read2Byte()
staging: r8188eu: remove unused ODM_FreeMemory()
staging: r8188eu: remove unused ODM_AllocateMemory()
staging: r8188eu: remove unused prototype ODM_InitializeTimer()
staging: r8188eu: remove unused ODM_CancelAllTimers()
staging: r8188eu: remove unused ODM_InitAllTimers()
drivers/staging/r8188eu/hal/odm.c | 17 ----
drivers/staging/r8188eu/hal/odm_interface.c | 80 -------------------
drivers/staging/r8188eu/include/odm.h | 6 --
.../staging/r8188eu/include/odm_interface.h | 45 -----------
4 files changed, 148 deletions(-)
--
2.33.0
Function ODM_AcquireSpinLock() is unused and empty, remove it.
Signed-off-by: Michael Straube <[email protected]>
---
drivers/staging/r8188eu/hal/odm_interface.c | 4 ----
drivers/staging/r8188eu/include/odm_interface.h | 3 ---
2 files changed, 7 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/odm_interface.c b/drivers/staging/r8188eu/hal/odm_interface.c
index c33ef4736ff6..ab9100d4b1e1 100644
--- a/drivers/staging/r8188eu/hal/odm_interface.c
+++ b/drivers/staging/r8188eu/hal/odm_interface.c
@@ -94,10 +94,6 @@ s32 ODM_CompareMemory(struct odm_dm_struct *pDM_Odm, void *pBuf1, void *pBuf2, u
}
/* ODM MISC relative API. */
-void ODM_AcquireSpinLock(struct odm_dm_struct *pDM_Odm, enum RT_SPINLOCK_TYPE type)
-{
-}
-
void ODM_ReleaseSpinLock(struct odm_dm_struct *pDM_Odm, enum RT_SPINLOCK_TYPE type)
{
}
diff --git a/drivers/staging/r8188eu/include/odm_interface.h b/drivers/staging/r8188eu/include/odm_interface.h
index 9109d72915cd..7eccf459b636 100644
--- a/drivers/staging/r8188eu/include/odm_interface.h
+++ b/drivers/staging/r8188eu/include/odm_interface.h
@@ -96,9 +96,6 @@ s32 ODM_CompareMemory(struct odm_dm_struct *pDM_Odm, void *pBuf1, void *pBuf2,
u32 length);
/* ODM MISC-spin lock relative API. */
-void ODM_AcquireSpinLock(struct odm_dm_struct *pDM_Odm,
- enum RT_SPINLOCK_TYPE type);
-
void ODM_ReleaseSpinLock(struct odm_dm_struct *pDM_Odm,
enum RT_SPINLOCK_TYPE type);
--
2.33.0
Function ODM_Read2Byte() is unused, remove it.
Signed-off-by: Michael Straube <[email protected]>
---
drivers/staging/r8188eu/hal/odm_interface.c | 6 ------
drivers/staging/r8188eu/include/odm_interface.h | 2 --
2 files changed, 8 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/odm_interface.c b/drivers/staging/r8188eu/hal/odm_interface.c
index 31888a6dd9a8..987fad541337 100644
--- a/drivers/staging/r8188eu/hal/odm_interface.c
+++ b/drivers/staging/r8188eu/hal/odm_interface.c
@@ -10,12 +10,6 @@ u8 ODM_Read1Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr)
return rtw_read8(Adapter, RegAddr);
}
-u16 ODM_Read2Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr)
-{
- struct adapter *Adapter = pDM_Odm->Adapter;
- return rtw_read16(Adapter, RegAddr);
-}
-
u32 ODM_Read4Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr)
{
struct adapter *Adapter = pDM_Odm->Adapter;
diff --git a/drivers/staging/r8188eu/include/odm_interface.h b/drivers/staging/r8188eu/include/odm_interface.h
index ce9e4d8b6830..e87ee60005c8 100644
--- a/drivers/staging/r8188eu/include/odm_interface.h
+++ b/drivers/staging/r8188eu/include/odm_interface.h
@@ -62,8 +62,6 @@ typedef void (*RT_WORKITEM_CALL_BACK)(void *pContext);
u8 ODM_Read1Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr);
-u16 ODM_Read2Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr);
-
u32 ODM_Read4Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr);
void ODM_Write1Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr, u8 Data);
--
2.33.0
Function ODM_SetTimer() is unused, remove it.
Signed-off-by: Michael Straube <[email protected]>
---
drivers/staging/r8188eu/hal/odm_interface.c | 5 -----
drivers/staging/r8188eu/include/odm_interface.h | 3 ---
2 files changed, 8 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/odm_interface.c b/drivers/staging/r8188eu/hal/odm_interface.c
index 7fd450575eb4..31888a6dd9a8 100644
--- a/drivers/staging/r8188eu/hal/odm_interface.c
+++ b/drivers/staging/r8188eu/hal/odm_interface.c
@@ -114,11 +114,6 @@ void ODM_sleep_ms(u32 ms)
msleep(ms);
}
-void ODM_SetTimer(struct odm_dm_struct *pDM_Odm, struct timer_list *pTimer, u32 msDelay)
-{
- _set_timer(pTimer, msDelay); /* ms */
-}
-
void ODM_CancelTimer(struct odm_dm_struct *pDM_Odm, struct timer_list *pTimer)
{
_cancel_timer_ex(pTimer);
diff --git a/drivers/staging/r8188eu/include/odm_interface.h b/drivers/staging/r8188eu/include/odm_interface.h
index f6c23fd9b31b..ce9e4d8b6830 100644
--- a/drivers/staging/r8188eu/include/odm_interface.h
+++ b/drivers/staging/r8188eu/include/odm_interface.h
@@ -104,9 +104,6 @@ void ODM_delay_us(u32 us);
void ODM_sleep_ms(u32 ms);
-void ODM_SetTimer(struct odm_dm_struct *pDM_Odm, struct timer_list *pTimer,
- u32 msDelay);
-
void ODM_InitializeTimer(struct odm_dm_struct *pDM_Odm,
struct timer_list *pTimer, void *CallBackFunc,
void *pContext, const char *szID);
--
2.33.0
Function ODM_StopWorkItem() is unused and empty, remove it.
Signed-off-by: Michael Straube <[email protected]>
---
drivers/staging/r8188eu/hal/odm_interface.c | 4 ----
drivers/staging/r8188eu/include/odm_interface.h | 2 --
2 files changed, 6 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/odm_interface.c b/drivers/staging/r8188eu/hal/odm_interface.c
index 2ec73d998f0a..bd9d9f832eaf 100644
--- a/drivers/staging/r8188eu/hal/odm_interface.c
+++ b/drivers/staging/r8188eu/hal/odm_interface.c
@@ -94,10 +94,6 @@ s32 ODM_CompareMemory(struct odm_dm_struct *pDM_Odm, void *pBuf1, void *pBuf2, u
}
/* Work item relative API. FOr MP driver only~! */
-void ODM_StopWorkItem(void *pRtWorkItem)
-{
-}
-
void ODM_FreeWorkItem(void *pRtWorkItem)
{
}
diff --git a/drivers/staging/r8188eu/include/odm_interface.h b/drivers/staging/r8188eu/include/odm_interface.h
index febdbe7548ba..5ed4061d2f48 100644
--- a/drivers/staging/r8188eu/include/odm_interface.h
+++ b/drivers/staging/r8188eu/include/odm_interface.h
@@ -96,8 +96,6 @@ s32 ODM_CompareMemory(struct odm_dm_struct *pDM_Odm, void *pBuf1, void *pBuf2,
u32 length);
/* ODM MISC-workitem relative API. */
-void ODM_StopWorkItem(void *pRtWorkItem);
-
void ODM_FreeWorkItem(void *pRtWorkItem);
void ODM_ScheduleWorkItem(void *pRtWorkItem);
--
2.33.0
Function ODM_InitAllTimers() is unused, remove it.
Signed-off-by: Michael Straube <[email protected]>
---
drivers/staging/r8188eu/hal/odm.c | 5 -----
drivers/staging/r8188eu/include/odm.h | 2 --
2 files changed, 7 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/odm.c b/drivers/staging/r8188eu/hal/odm.c
index 0e5b14051ffd..d23e9296a10e 100644
--- a/drivers/staging/r8188eu/hal/odm.c
+++ b/drivers/staging/r8188eu/hal/odm.c
@@ -1404,11 +1404,6 @@ void odm_RSSIMonitorCheckAP(struct odm_dm_struct *pDM_Odm)
{
}
-void ODM_InitAllTimers(struct odm_dm_struct *pDM_Odm)
-{
- timer_setup(&pDM_Odm->DM_SWAT_Table.SwAntennaSwitchTimer, odm_SwAntDivChkAntSwitchCallback, 0);
-}
-
/* 3============================================================ */
/* 3 Tx Power Tracking */
/* 3============================================================ */
diff --git a/drivers/staging/r8188eu/include/odm.h b/drivers/staging/r8188eu/include/odm.h
index 4a5a7c754008..dd0681c138a8 100644
--- a/drivers/staging/r8188eu/include/odm.h
+++ b/drivers/staging/r8188eu/include/odm.h
@@ -1135,8 +1135,6 @@ void ODM_CmnInfoPtrArrayHook(struct odm_dm_struct *pDM_Odm,
void ODM_CmnInfoUpdate(struct odm_dm_struct *pDM_Odm, u32 CmnInfo, u64 Value);
-void ODM_InitAllTimers(struct odm_dm_struct *pDM_Odm);
-
void ODM_AntselStatistics_88C(struct odm_dm_struct *pDM_Odm, u8 MacId,
u32 PWDBAll, bool isCCKrate);
--
2.33.0
Function ODM_CancelAllTimers() is unused and it is the only caller
of function ODM_CancelTimer(). Remove both.
Signed-off-by: Michael Straube <[email protected]>
---
drivers/staging/r8188eu/hal/odm.c | 5 -----
drivers/staging/r8188eu/hal/odm_interface.c | 5 -----
drivers/staging/r8188eu/include/odm.h | 2 --
drivers/staging/r8188eu/include/odm_interface.h | 2 --
4 files changed, 14 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/odm.c b/drivers/staging/r8188eu/hal/odm.c
index 011ebcdac797..0e5b14051ffd 100644
--- a/drivers/staging/r8188eu/hal/odm.c
+++ b/drivers/staging/r8188eu/hal/odm.c
@@ -1409,11 +1409,6 @@ void ODM_InitAllTimers(struct odm_dm_struct *pDM_Odm)
timer_setup(&pDM_Odm->DM_SWAT_Table.SwAntennaSwitchTimer, odm_SwAntDivChkAntSwitchCallback, 0);
}
-void ODM_CancelAllTimers(struct odm_dm_struct *pDM_Odm)
-{
- ODM_CancelTimer(pDM_Odm, &pDM_Odm->DM_SWAT_Table.SwAntennaSwitchTimer);
-}
-
/* 3============================================================ */
/* 3 Tx Power Tracking */
/* 3============================================================ */
diff --git a/drivers/staging/r8188eu/hal/odm_interface.c b/drivers/staging/r8188eu/hal/odm_interface.c
index 4e56ebf30e76..c97104c3682f 100644
--- a/drivers/staging/r8188eu/hal/odm_interface.c
+++ b/drivers/staging/r8188eu/hal/odm_interface.c
@@ -96,8 +96,3 @@ void ODM_sleep_ms(u32 ms)
{
msleep(ms);
}
-
-void ODM_CancelTimer(struct odm_dm_struct *pDM_Odm, struct timer_list *pTimer)
-{
- _cancel_timer_ex(pTimer);
-}
diff --git a/drivers/staging/r8188eu/include/odm.h b/drivers/staging/r8188eu/include/odm.h
index a100fdf87379..4a5a7c754008 100644
--- a/drivers/staging/r8188eu/include/odm.h
+++ b/drivers/staging/r8188eu/include/odm.h
@@ -1137,8 +1137,6 @@ void ODM_CmnInfoUpdate(struct odm_dm_struct *pDM_Odm, u32 CmnInfo, u64 Value);
void ODM_InitAllTimers(struct odm_dm_struct *pDM_Odm);
-void ODM_CancelAllTimers(struct odm_dm_struct *pDM_Odm);
-
void ODM_AntselStatistics_88C(struct odm_dm_struct *pDM_Odm, u8 MacId,
u32 PWDBAll, bool isCCKrate);
diff --git a/drivers/staging/r8188eu/include/odm_interface.h b/drivers/staging/r8188eu/include/odm_interface.h
index c7784f540e7d..95e0303c28b8 100644
--- a/drivers/staging/r8188eu/include/odm_interface.h
+++ b/drivers/staging/r8188eu/include/odm_interface.h
@@ -99,6 +99,4 @@ void ODM_delay_us(u32 us);
void ODM_sleep_ms(u32 ms);
-void ODM_CancelTimer(struct odm_dm_struct *pDM_Odm, struct timer_list *pTimer);
-
#endif /* __ODM_INTERFACE_H__ */
--
2.33.0
The function prototype ODM_InitializeTimer() is not used, remove it.
Signed-off-by: Michael Straube <[email protected]>
---
drivers/staging/r8188eu/include/odm_interface.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/staging/r8188eu/include/odm_interface.h b/drivers/staging/r8188eu/include/odm_interface.h
index 2b103aecd859..c7784f540e7d 100644
--- a/drivers/staging/r8188eu/include/odm_interface.h
+++ b/drivers/staging/r8188eu/include/odm_interface.h
@@ -99,10 +99,6 @@ void ODM_delay_us(u32 us);
void ODM_sleep_ms(u32 ms);
-void ODM_InitializeTimer(struct odm_dm_struct *pDM_Odm,
- struct timer_list *pTimer, void *CallBackFunc,
- void *pContext, const char *szID);
-
void ODM_CancelTimer(struct odm_dm_struct *pDM_Odm, struct timer_list *pTimer);
#endif /* __ODM_INTERFACE_H__ */
--
2.33.0
Function ODM_ReleaseTimer() is empty and its only caller is
ODM_ReleaseAllTimers(). Remove both functions.
Signed-off-by: Michael Straube <[email protected]>
---
drivers/staging/r8188eu/hal/odm.c | 7 -------
drivers/staging/r8188eu/hal/odm_interface.c | 4 ----
drivers/staging/r8188eu/include/odm.h | 2 --
drivers/staging/r8188eu/include/odm_interface.h | 2 --
4 files changed, 15 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/odm.c b/drivers/staging/r8188eu/hal/odm.c
index f0fd88d98e95..011ebcdac797 100644
--- a/drivers/staging/r8188eu/hal/odm.c
+++ b/drivers/staging/r8188eu/hal/odm.c
@@ -1414,13 +1414,6 @@ void ODM_CancelAllTimers(struct odm_dm_struct *pDM_Odm)
ODM_CancelTimer(pDM_Odm, &pDM_Odm->DM_SWAT_Table.SwAntennaSwitchTimer);
}
-void ODM_ReleaseAllTimers(struct odm_dm_struct *pDM_Odm)
-{
- ODM_ReleaseTimer(pDM_Odm, &pDM_Odm->DM_SWAT_Table.SwAntennaSwitchTimer);
-
- ODM_ReleaseTimer(pDM_Odm, &pDM_Odm->FastAntTrainingTimer);
-}
-
/* 3============================================================ */
/* 3 Tx Power Tracking */
/* 3============================================================ */
diff --git a/drivers/staging/r8188eu/hal/odm_interface.c b/drivers/staging/r8188eu/hal/odm_interface.c
index 5a01495d74bc..c33ef4736ff6 100644
--- a/drivers/staging/r8188eu/hal/odm_interface.c
+++ b/drivers/staging/r8188eu/hal/odm_interface.c
@@ -165,10 +165,6 @@ void ODM_CancelTimer(struct odm_dm_struct *pDM_Odm, struct timer_list *pTimer)
_cancel_timer_ex(pTimer);
}
-void ODM_ReleaseTimer(struct odm_dm_struct *pDM_Odm, struct timer_list *pTimer)
-{
-}
-
/* ODM FW relative API. */
u32 ODM_FillH2CCmd(u8 *pH2CBuffer, u32 H2CBufferLen, u32 CmdNum,
u32 *pElementID, u32 *pCmdLen,
diff --git a/drivers/staging/r8188eu/include/odm.h b/drivers/staging/r8188eu/include/odm.h
index 7c8f082930dd..a100fdf87379 100644
--- a/drivers/staging/r8188eu/include/odm.h
+++ b/drivers/staging/r8188eu/include/odm.h
@@ -1139,8 +1139,6 @@ void ODM_InitAllTimers(struct odm_dm_struct *pDM_Odm);
void ODM_CancelAllTimers(struct odm_dm_struct *pDM_Odm);
-void ODM_ReleaseAllTimers(struct odm_dm_struct *pDM_Odm);
-
void ODM_AntselStatistics_88C(struct odm_dm_struct *pDM_Odm, u8 MacId,
u32 PWDBAll, bool isCCKrate);
diff --git a/drivers/staging/r8188eu/include/odm_interface.h b/drivers/staging/r8188eu/include/odm_interface.h
index 6b589413d56c..9109d72915cd 100644
--- a/drivers/staging/r8188eu/include/odm_interface.h
+++ b/drivers/staging/r8188eu/include/odm_interface.h
@@ -137,8 +137,6 @@ void ODM_InitializeTimer(struct odm_dm_struct *pDM_Odm,
void ODM_CancelTimer(struct odm_dm_struct *pDM_Odm, struct timer_list *pTimer);
-void ODM_ReleaseTimer(struct odm_dm_struct *pDM_Odm, struct timer_list *pTimer);
-
/* ODM FW relative API. */
u32 ODM_FillH2CCmd(u8 *pH2CBuffer, u32 H2CBufferLen, u32 CmdNum,
u32 *pElementID, u32 *pCmdLen, u8 **pCmbBuffer,
--
2.33.0
Function ODM_StartWorkItem() is unused and empty, remove it.
Signed-off-by: Michael Straube <[email protected]>
---
drivers/staging/r8188eu/hal/odm_interface.c | 4 ----
drivers/staging/r8188eu/include/odm_interface.h | 2 --
2 files changed, 6 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/odm_interface.c b/drivers/staging/r8188eu/hal/odm_interface.c
index ee1d2cb232a5..2ec73d998f0a 100644
--- a/drivers/staging/r8188eu/hal/odm_interface.c
+++ b/drivers/staging/r8188eu/hal/odm_interface.c
@@ -94,10 +94,6 @@ s32 ODM_CompareMemory(struct odm_dm_struct *pDM_Odm, void *pBuf1, void *pBuf2, u
}
/* Work item relative API. FOr MP driver only~! */
-void ODM_StartWorkItem(void *pRtWorkItem)
-{
-}
-
void ODM_StopWorkItem(void *pRtWorkItem)
{
}
diff --git a/drivers/staging/r8188eu/include/odm_interface.h b/drivers/staging/r8188eu/include/odm_interface.h
index 6f65ae519b4f..febdbe7548ba 100644
--- a/drivers/staging/r8188eu/include/odm_interface.h
+++ b/drivers/staging/r8188eu/include/odm_interface.h
@@ -96,8 +96,6 @@ s32 ODM_CompareMemory(struct odm_dm_struct *pDM_Odm, void *pBuf1, void *pBuf2,
u32 length);
/* ODM MISC-workitem relative API. */
-void ODM_StartWorkItem(void *pRtWorkItem);
-
void ODM_StopWorkItem(void *pRtWorkItem);
void ODM_FreeWorkItem(void *pRtWorkItem);
--
2.33.0
Thus wrote Michael Straube ([email protected]):
> This series removes unused and/or empty functions from the file
> hal/odm_interface.c.
> Tested on x86_64 with Inter-Tech DMG-02.
> Michael Straube (18):
> staging: r8188eu: remove empty ODM_ReleaseTimer()
> staging: r8188eu: remove unused ODM_AcquireSpinLock()
> staging: r8188eu: remove unused ODM_ReleaseSpinLock()
> staging: r8188eu: remove unused ODM_FillH2CCmd()
> staging: r8188eu: remove unused ODM_sleep_us()
> staging: r8188eu: remove unused ODM_InitializeWorkItem()
> staging: r8188eu: remove unused ODM_StartWorkItem()
> staging: r8188eu: remove unused ODM_StopWorkItem()
> staging: r8188eu: remove unused ODM_FreeWorkItem()
> staging: r8188eu: remove unused ODM_ScheduleWorkItem()
> staging: r8188eu: remove unused ODM_IsWorkItemScheduled()
> staging: r8188eu: remove unused ODM_SetTimer()
> staging: r8188eu: remove unused ODM_Read2Byte()
> staging: r8188eu: remove unused ODM_FreeMemory()
> staging: r8188eu: remove unused ODM_AllocateMemory()
> staging: r8188eu: remove unused prototype ODM_InitializeTimer()
> staging: r8188eu: remove unused ODM_CancelAllTimers()
> staging: r8188eu: remove unused ODM_InitAllTimers()
> drivers/staging/r8188eu/hal/odm.c | 17 ----
> drivers/staging/r8188eu/hal/odm_interface.c | 80 -------------------
> drivers/staging/r8188eu/include/odm.h | 6 --
> .../staging/r8188eu/include/odm_interface.h | 45 -----------
> 4 files changed, 148 deletions(-)
Looks good to me.
Acked-by: Martin Kaiser <[email protected]>
for all patches.
Thanks,
Martin