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' How about something like this? diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 5451eb1..fb8d2d2 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h @@ -38,7 +38,7 @@ extern void free_percpu(const void *); #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) {
Attachment:
pgpFu6o1tFZeW.pgp
Description: PGP signature
- Prev by Date: Re: 3D video card recommendations
- Next by Date: Re: 3D video card recommendations
- Previous by thread: [PATCH] x86_64: fix page fault from show_trace()
- Next by thread: [patch 1/1] selinux: MLS compatibility
- Index(es):