Commit 690910c0 authored by Hari Prasath Gujulan Elango's avatar Hari Prasath Gujulan Elango Committed by Greg Kroah-Hartman

staging: wilc1000: remove ununsed variable & associated code

This patch removes the ununsed variable 'priv' at multiple instances and
all its associated code where its assigned a value.
Signed-off-by: default avatarHari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 81053222
...@@ -144,9 +144,7 @@ bool g_wep_keys_saved = false; ...@@ -144,9 +144,7 @@ bool g_wep_keys_saved = false;
void clear_shadow_scan(void *pUserVoid) void clear_shadow_scan(void *pUserVoid)
{ {
struct WILC_WFI_priv *priv;
int i; int i;
priv = (struct WILC_WFI_priv *)pUserVoid;
if (op_ifcs == 0) { if (op_ifcs == 0) {
WILC_TimerDestroy(&hAgingTimer, NULL); WILC_TimerDestroy(&hAgingTimer, NULL);
PRINT_INFO(CORECONFIG_DBG, "destroy aging timer\n"); PRINT_INFO(CORECONFIG_DBG, "destroy aging timer\n");
...@@ -219,9 +217,7 @@ void refresh_scan(void *pUserVoid, uint8_t all, bool bDirectScan) ...@@ -219,9 +217,7 @@ void refresh_scan(void *pUserVoid, uint8_t all, bool bDirectScan)
void reset_shadow_found(void *pUserVoid) void reset_shadow_found(void *pUserVoid)
{ {
struct WILC_WFI_priv *priv;
int i; int i;
priv = (struct WILC_WFI_priv *)pUserVoid;
for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) { for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) {
astrLastScannedNtwrksShadow[i].u8Found = 0; astrLastScannedNtwrksShadow[i].u8Found = 0;
...@@ -230,9 +226,7 @@ void reset_shadow_found(void *pUserVoid) ...@@ -230,9 +226,7 @@ void reset_shadow_found(void *pUserVoid)
void update_scan_time(void *pUserVoid) void update_scan_time(void *pUserVoid)
{ {
struct WILC_WFI_priv *priv;
int i; int i;
priv = (struct WILC_WFI_priv *)pUserVoid;
for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) { for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) {
astrLastScannedNtwrksShadow[i].u32TimeRcvdInScan = jiffies; astrLastScannedNtwrksShadow[i].u32TimeRcvdInScan = jiffies;
} }
...@@ -240,11 +234,9 @@ void update_scan_time(void *pUserVoid) ...@@ -240,11 +234,9 @@ void update_scan_time(void *pUserVoid)
void remove_network_from_shadow(void *pUserVoid) void remove_network_from_shadow(void *pUserVoid)
{ {
struct WILC_WFI_priv *priv;
unsigned long now = jiffies; unsigned long now = jiffies;
int i, j; int i, j;
priv = (struct WILC_WFI_priv *)pUserVoid;
for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) { for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) {
if (time_after(now, astrLastScannedNtwrksShadow[i].u32TimeRcvdInScan + (unsigned long)(SCAN_RESULT_EXPIRE))) { if (time_after(now, astrLastScannedNtwrksShadow[i].u32TimeRcvdInScan + (unsigned long)(SCAN_RESULT_EXPIRE))) {
...@@ -281,11 +273,9 @@ void clear_duringIP(void *pUserVoid) ...@@ -281,11 +273,9 @@ void clear_duringIP(void *pUserVoid)
int8_t is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid) int8_t is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid)
{ {
struct WILC_WFI_priv *priv;
int8_t state = -1; int8_t state = -1;
int i; int i;
priv = (struct WILC_WFI_priv *)pUserVoid;
if (u32LastScannedNtwrksCountShadow == 0) { if (u32LastScannedNtwrksCountShadow == 0) {
PRINT_D(CFG80211_DBG, "Starting Aging timer\n"); PRINT_D(CFG80211_DBG, "Starting Aging timer\n");
WILC_TimerStart(&(hAgingTimer), AGING_TIME, pUserVoid, NULL); WILC_TimerStart(&(hAgingTimer), AGING_TIME, pUserVoid, NULL);
...@@ -305,11 +295,9 @@ int8_t is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid) ...@@ -305,11 +295,9 @@ int8_t is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid)
void add_network_to_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid, void *pJoinParams) void add_network_to_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid, void *pJoinParams)
{ {
struct WILC_WFI_priv *priv;
int8_t ap_found = is_network_in_shadow(pstrNetworkInfo, pUserVoid); int8_t ap_found = is_network_in_shadow(pstrNetworkInfo, pUserVoid);
uint32_t ap_index = 0; uint32_t ap_index = 0;
uint8_t rssi_index = 0; uint8_t rssi_index = 0;
priv = (struct WILC_WFI_priv *)pUserVoid;
if (u32LastScannedNtwrksCountShadow >= MAX_NUM_SCANNED_NETWORKS_SHADOW) { if (u32LastScannedNtwrksCountShadow >= MAX_NUM_SCANNED_NETWORKS_SHADOW) {
PRINT_D(CFG80211_DBG, "Shadow network reached its maximum limit\n"); PRINT_D(CFG80211_DBG, "Shadow network reached its maximum limit\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment