]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
cfg80211: use __force __rcu to suppress sparse warning
authorJohannes Berg <johannes.berg@intel.com>
Fri, 12 Dec 2014 11:26:25 +0000 (12:26 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 12 Dec 2014 11:27:23 +0000 (12:27 +0100)
The code assigns a constant value (a pointer to a static variable)
to an RCU pointer, which results in a sparse warning:
  reg.c:112:10: warning: cast adds address space to expression (<asn:4>)

Suppress this warning by using __force.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/reg.c

index 47be6163381caadf41afab40122d74f4a19448e6..d83480b6efde165be88c65d51edadf9f7b950908 100644 (file)
@@ -109,7 +109,7 @@ static struct regulatory_request core_request_world = {
  * protected by RTNL (and can be accessed with RCU protection)
  */
 static struct regulatory_request __rcu *last_request =
-       (void __rcu *)&core_request_world;
+       (void __force __rcu *)&core_request_world;
 
 /* To trigger userspace events */
 static struct platform_device *reg_pdev;