提交 66341a90 编写于 作者: P Paul Mundt 提交者: Linus Torvalds

[PATCH] Shut up per_cpu_ptr() on UP

Currently per_cpu_ptr() doesn't really do anything with 'cpu' in the UP
case.  This is problematic in the cases where this is the only place the
variable is referenced:

  CC      kernel/workqueue.o
  kernel/workqueue.c: In function `current_is_keventd':
  kernel/workqueue.c:460: warning: unused variable `cpu'
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 0f5c79f2
...@@ -38,7 +38,7 @@ extern void free_percpu(const void *); ...@@ -38,7 +38,7 @@ extern void free_percpu(const void *);
#else /* CONFIG_SMP */ #else /* CONFIG_SMP */
#define per_cpu_ptr(ptr, cpu) (ptr) #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); })
static inline void *__alloc_percpu(size_t size, size_t align) static inline void *__alloc_percpu(size_t size, size_t align)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册