浏览代码

cfg80211: use __force __rcu to suppress sparse warning

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>
Johannes Berg 10 年之前
父节点
当前提交
cec3f0ed7d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/wireless/reg.c

+ 1 - 1
net/wireless/reg.c

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