OSDN Git Service

mac80211: Replace rcu_dereference() with rcu_access_pointer()
authorAndreea-Cristina Bernat <bernat.ada@gmail.com>
Sun, 17 Aug 2014 13:18:02 +0000 (16:18 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 27 Aug 2014 10:14:10 +0000 (12:14 +0200)
commit2688eba9d5ba2a35ac8e5efa2e228f105f0a379f
tree3b3db587d368a1b17594c94e14f52b164196f16c
parentad053a962f1e83597ec8388716619c7633a00ef1
mac80211: Replace rcu_dereference() with rcu_access_pointer()

The "rcu_dereference()" calls are used directly in conditions.
Since their return values are never dereferenced it is recommended to
use "rcu_access_pointer()" instead of "rcu_dereference()".
Therefore, this patch makes the replacements.

The following Coccinelle semantic patch was used:
@@
@@

(
 if(
 (<+...
- rcu_dereference
+ rcu_access_pointer
  (...)
  ...+>)) {...}
|
 while(
 (<+...
- rcu_dereference
+ rcu_access_pointer
  (...)
  ...+>)) {...}
)

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mesh_pathtbl.c