diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-01-19 11:15:23 -0500 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2019-03-18 10:11:06 -0400 |
commit | aa36e3616532f82a920b5ebf4e059fbafae63d88 (patch) | |
tree | 8bf802701e99c78e1b91c02816606f494a0005a7 | |
parent | 9e98c678c2d6ae3a17cb2de55d17f69dddaa231b (diff) |
thermal/intel_powerclamp: fix __percpu declaration of worker_data
This variable is declared as:
static struct powerclamp_worker_data * __percpu worker_data;
In other words, a percpu pointer to struct ...
But this variable not used like so but as a pointer to a percpu
struct powerclamp_worker_data.
So fix the declaration as:
static struct powerclamp_worker_data __percpu *worker_data;
This also quiets Sparse's warnings from __verify_pcpu_ptr(), like:
494:49: warning: incorrect type in initializer (different address spaces)
494:49: expected void const [noderef] <asn:3> *__vpp_verify
494:49: got struct powerclamp_worker_data *
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-rw-r--r-- | drivers/thermal/intel/intel_powerclamp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/intel/intel_powerclamp.c b/drivers/thermal/intel/intel_powerclamp.c index 7571f7c2e7c9..b12ecd436e23 100644 --- a/drivers/thermal/intel/intel_powerclamp.c +++ b/drivers/thermal/intel/intel_powerclamp.c | |||
@@ -101,7 +101,7 @@ struct powerclamp_worker_data { | |||
101 | bool clamping; | 101 | bool clamping; |
102 | }; | 102 | }; |
103 | 103 | ||
104 | static struct powerclamp_worker_data * __percpu worker_data; | 104 | static struct powerclamp_worker_data __percpu *worker_data; |
105 | static struct thermal_cooling_device *cooling_dev; | 105 | static struct thermal_cooling_device *cooling_dev; |
106 | static unsigned long *cpu_clamping_mask; /* bit map for tracking per cpu | 106 | static unsigned long *cpu_clamping_mask; /* bit map for tracking per cpu |
107 | * clamping kthread worker | 107 | * clamping kthread worker |