From: Hari Prasath Gujulan Elango Date: Mon, 22 Jun 2015 07:05:22 +0000 (+0000) Subject: staging: wilc1000: remove ununsed variable & associated code X-Git-Tag: v4.3-rc1~158^2~770 X-Git-Url: http://git.cascardo.info/?a=commitdiff_plain;h=690910c0cf350a96590c6795f2d0f26e5f8ec59f;p=cascardo%2Flinux.git 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: Hari Prasath Gujulan Elango Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index f7f5fafe49fe..1d0b7f87b100 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -144,9 +144,7 @@ bool g_wep_keys_saved = false; void clear_shadow_scan(void *pUserVoid) { - struct WILC_WFI_priv *priv; int i; - priv = (struct WILC_WFI_priv *)pUserVoid; if (op_ifcs == 0) { WILC_TimerDestroy(&hAgingTimer, NULL); PRINT_INFO(CORECONFIG_DBG, "destroy aging timer\n"); @@ -219,9 +217,7 @@ void refresh_scan(void *pUserVoid, uint8_t all, bool bDirectScan) void reset_shadow_found(void *pUserVoid) { - struct WILC_WFI_priv *priv; int i; - priv = (struct WILC_WFI_priv *)pUserVoid; for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) { astrLastScannedNtwrksShadow[i].u8Found = 0; @@ -230,9 +226,7 @@ void reset_shadow_found(void *pUserVoid) void update_scan_time(void *pUserVoid) { - struct WILC_WFI_priv *priv; int i; - priv = (struct WILC_WFI_priv *)pUserVoid; for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) { astrLastScannedNtwrksShadow[i].u32TimeRcvdInScan = jiffies; } @@ -240,11 +234,9 @@ void update_scan_time(void *pUserVoid) void remove_network_from_shadow(void *pUserVoid) { - struct WILC_WFI_priv *priv; unsigned long now = jiffies; int i, j; - priv = (struct WILC_WFI_priv *)pUserVoid; for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) { if (time_after(now, astrLastScannedNtwrksShadow[i].u32TimeRcvdInScan + (unsigned long)(SCAN_RESULT_EXPIRE))) { @@ -281,11 +273,9 @@ void clear_duringIP(void *pUserVoid) int8_t is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid) { - struct WILC_WFI_priv *priv; int8_t state = -1; int i; - priv = (struct WILC_WFI_priv *)pUserVoid; if (u32LastScannedNtwrksCountShadow == 0) { PRINT_D(CFG80211_DBG, "Starting Aging timer\n"); WILC_TimerStart(&(hAgingTimer), AGING_TIME, pUserVoid, NULL); @@ -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) { - struct WILC_WFI_priv *priv; int8_t ap_found = is_network_in_shadow(pstrNetworkInfo, pUserVoid); uint32_t ap_index = 0; uint8_t rssi_index = 0; - priv = (struct WILC_WFI_priv *)pUserVoid; if (u32LastScannedNtwrksCountShadow >= MAX_NUM_SCANNED_NETWORKS_SHADOW) { PRINT_D(CFG80211_DBG, "Shadow network reached its maximum limit\n");