Skip to content

Commit aa36e36

Browse files
lucvoozhang-rui
authored andcommitted
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 <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Signed-off-by: Zhang Rui <[email protected]>
1 parent 9e98c67 commit aa36e36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/thermal/intel/intel_powerclamp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ struct powerclamp_worker_data {
101101
bool clamping;
102102
};
103103

104-
static struct powerclamp_worker_data * __percpu worker_data;
104+
static struct powerclamp_worker_data __percpu *worker_data;
105105
static struct thermal_cooling_device *cooling_dev;
106106
static unsigned long *cpu_clamping_mask; /* bit map for tracking per cpu
107107
* clamping kthread worker

0 commit comments

Comments
 (0)