diff options
author | Andreea-Cristina Bernat <bernat.ada@gmail.com> | 2014-08-22 15:14:49 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-08-26 11:16:31 +0200 |
commit | ad053a962f1e83597ec8388716619c7633a00ef1 (patch) | |
tree | e0bc7da7d4552ba189e71b00f4bab6f848d2fe4a /net/mac80211 | |
parent | cfg80211: allow passing frame type to cfg80211_inform_bss() (diff) | |
download | linux-ad053a962f1e83597ec8388716619c7633a00ef1.tar.xz linux-ad053a962f1e83597ec8388716619c7633a00ef1.zip |
mac80211: scan: Replace rcu_assign_pointer() with RCU_INIT_POINTER()
The use of "rcu_assign_pointer()" is NULLing out the pointer.
According to RCU_INIT_POINTER()'s block comment:
"1. This use of RCU_INIT_POINTER() is NULLing out the pointer"
it is better to use it instead of rcu_assign_pointer() because it has a
smaller overhead.
The following Coccinelle semantic patch was used:
@@
@@
- rcu_assign_pointer
+ RCU_INIT_POINTER
(..., NULL)
Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/scan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index a0a938145dcc..a9bb6eb8c3e0 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -1094,7 +1094,7 @@ int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata) if (rcu_access_pointer(local->sched_scan_sdata)) { ret = drv_sched_scan_stop(local, sdata); if (!ret) - rcu_assign_pointer(local->sched_scan_sdata, NULL); + RCU_INIT_POINTER(local->sched_scan_sdata, NULL); } out: mutex_unlock(&local->mtx); |