[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160525195745.GH3354@mtj.duckdns.org>
Date: Wed, 25 May 2016 15:57:45 -0400
From: Tejun Heo <tj@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Alexey Dobriyan <adobriyan@...il.com>, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org,
Paul McKenney <paulmck@...ux.vnet.ibm.com>
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
Powered by blists - more mailing lists