Skip to content

Commit

Permalink
cfg80211: use __force __rcu to suppress sparse warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg committed Dec 12, 2014
1 parent 70e71ca commit cec3f0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cec3f0e

Please sign in to comment.