Messages in this thread | | | Date | Wed, 25 May 2016 15:57:45 -0400 | From | Tejun Heo <> | Subject | Re: [PATCH] seqlock: fix raw_read_seqcount_latch() |
| |
Hello,
On Mon, May 23, 2016 at 11:36:18AM +0200, Peter Zijlstra wrote: > > include/linux/percpu-refcount.h:146:36: warning: initialization makes pointer from integer without a cast [-Wint-conversion] > > percpu_ptr = lockless_dereference(ref->percpu_count_ptr); > > TJ; would you prefer casting or not using lockless_dereference() here?
Casting is nasty - *(unsigned long __percpu **)& - because the macro expects an lvalue. I think it'd be better to revert to opencoding READ_ONCE() and barrier there. It's a pretty special case anyway.
Thanks.
-- tejun
| |