History

smpboot: Place the __percpu annotation correctly

The test robot reported a wrong assignment of a per-CPU variable which it detected by using sparse and sent a report. The assignment itself is correct. The annotation for sparse was wrong and hence the report. The first pointer is a "normal" pointer and points to the per-CPU memory area. That means that the __percpu annotation has to be moved. Move the __percpu annotation to pointer which points to the per-CPU area. This change affects only the sparse tool (and is ignored by the compiler).

Sebastian Andrzej Siewior committed 7 years ago

Commit d4645d31 parent de7b77e1 file · +1 −1Browse files

Unified · Split

include/linux/smpboot.h+1−1
@@ -29,7 +29,7 @@ struct smpboot_thread_data; · 28 unmodified lines
29 * @thread_comm: The base name of the thread29 * @thread_comm: The base name of the thread
30 */30 */
31struct smp_hotplug_thread {31struct smp_hotplug_thread {
32 struct task_struct __percpu **store;32 struct task_struct * __percpu *store;
33 struct list_head list;33 struct list_head list;
34 int (*thread_should_run)(unsigned int cpu);34 int (*thread_should_run)(unsigned int cpu);
35 void (*thread_fn)(unsigned int cpu);35 void (*thread_fn)(unsigned int cpu);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t