* [PATCH] Staging: wilc1000: wilc_wfi_cfgoperations: Remove unused code
@ 2015-10-13 9:48 Shivani Bhardwaj
2015-10-13 9:54 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 2+ messages in thread
From: Shivani Bhardwaj @ 2015-10-13 9:48 UTC (permalink / raw)
To: outreachy-kernel
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 <shivanib134@gmail.com>
---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 6472777..d2e6f55 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -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;
}
}
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: wilc1000: wilc_wfi_cfgoperations: Remove unused code
2015-10-13 9:48 [PATCH] Staging: wilc1000: wilc_wfi_cfgoperations: Remove unused code Shivani Bhardwaj
@ 2015-10-13 9:54 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2015-10-13 9:54 UTC (permalink / raw)
To: Shivani Bhardwaj; +Cc: outreachy-kernel
On Tue, 13 Oct 2015, Shivani Bhardwaj wrote:
> 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 <shivanib134@gmail.com>
> ---
> drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> index 6472777..d2e6f55 100644
> --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> @@ -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;
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
> break;
> }
> }
> --
> 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 outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> 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.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-13 9:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-13 9:48 [PATCH] Staging: wilc1000: wilc_wfi_cfgoperations: Remove unused code Shivani Bhardwaj
2015-10-13 9:54 ` [Outreachy kernel] " Julia Lawall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.