Staging: wilc1000: wilc_wfi_cfgoperations: Remove unused code
PATCH 1/1 Staging: wilc1000: wilc_wfi_cfgoperations: Remove unused code
Remove the declaration, initialization and statement having a variable that is not used anywhere in the code. Semantic patch used:
@@
type T;
identifier i;
constant C;
position p != e.p;
@@
- T i@p;
<+... when != i
- i = C;
...+>
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +0 -2
@@ -1764,7 +1764,6 @@ static int del_pmksa(struct wiphy *wiphy, struct net_device *netdev, {u32 i; -u8 flag =0 ;s32 s32Error =0 ;struct wilc_priv *priv =wiphy_priv (wiphy);
@@ -1777,7 +1776,6 @@ static int del_pmksa(struct wiphy *wiphy, struct net_device *netdev,/*If bssid is found, reset the values*/ PRINT_D (CFG80211_DBG ,"Reseting PMKID values\n" );memset (&priv->pmkid_list.pmkidlist[i],0 ,sizeof (struct host_if_pmkid )); - flag =PMKID_FOUND ;break ; } }
Signature · 1 line
2.1.0
Quoted 34 lines · Shivani Bhardwaj
Remove the declaration, initialization and statement having a variable that is not used anywhere in the code. Semantic patch used:
@@
type T;
identifier i;
constant C;
position p != e.p;
@@- T i@p;
<+... when != i
- i = C;
...+>Signed-off-by Shivani Bhardwaj <[email protected]>--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 -- 1 file changed, 2 deletions(-)drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +0
-1@@ -1764,7 +1764,6 @@ static int del_pmksa(struct wiphy *wiphy, struct net_device *netdev, {u32 i; -u8 flag =0 ;s32 s32Error =0 ;struct wilc_priv *priv =wiphy_priv (wiphy);
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c static int del_pmksa(struct wiphy *wiphy, struct net_device *netdev, · line 1780
Quoted 4 lines
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +0
-1@@ -1777,7 +1776,6 @@ static int del_pmksa(struct wiphy *wiphy, struct net_device *netdev,/*If bssid is found, reset the values*/ PRINT_D (CFG80211_DBG ,"Reseting PMKID values\n" );memset (&priv->pmkid_list.pmkidlist[i],0 ,sizeof (struct host_if_pmkid )); - flag =PMKID_FOUND ;
This constant is used at only one other place. Maybe there you could change the flag variable to pmkid_found, of type bool, and get rid of the constant completely.
julia
Quoted 13 lines
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +0
-1break ; } } --2.1.0
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20151013094837.GA4291%40ubuntu.
For more options, visit https://groups.google.com/d/optout.