]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mac80211: scan: Replace rcu_assign_pointer() with RCU_INIT_POINTER()
authorAndreea-Cristina Bernat <bernat.ada@gmail.com>
Fri, 22 Aug 2014 13:14:49 +0000 (16:14 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 26 Aug 2014 09:16:31 +0000 (11:16 +0200)
commitad053a962f1e83597ec8388716619c7633a00ef1
treee0bc7da7d4552ba189e71b00f4bab6f848d2fe4a
parent5bc8c1f2b070bab82ed738f98ecfac725e33c57f
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>
net/mac80211/scan.c