Re: [PATCH] seqlock: fix raw_read_seqcount_latch()

2016-05-27 Thread Peter Zijlstra
On Sat, May 21, 2016 at 11:14:49PM +0300, Alexey Dobriyan wrote: > lockless_dereference() is supposed to take pointer not integer. > > Signed-off-by: Alexey Dobriyan > --- > > include/linux/seqlock.h |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > --- a/include/linux/seqlock

Re: [PATCH] seqlock: fix raw_read_seqcount_latch()

2016-05-25 Thread Tejun Heo
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 pr

Re: [PATCH] seqlock: fix raw_read_seqcount_latch()

2016-05-23 Thread Peter Zijlstra
On Sun, May 22, 2016 at 09:50:40PM +0300, Alexey Dobriyan wrote: > On Sun, May 22, 2016 at 12:48:27PM +0200, Peter Zijlstra wrote: > > On Sat, May 21, 2016 at 11:14:49PM +0300, Alexey Dobriyan wrote: > > > lockless_dereference() is supposed to take pointer not integer. > > > > Urgh :/ > > > > Is

Re: [PATCH] seqlock: fix raw_read_seqcount_latch()

2016-05-22 Thread Alexey Dobriyan
On Sun, May 22, 2016 at 12:48:27PM +0200, Peter Zijlstra wrote: > On Sat, May 21, 2016 at 11:14:49PM +0300, Alexey Dobriyan wrote: > > lockless_dereference() is supposed to take pointer not integer. > > Urgh :/ > > Is there any way we can make lockless_dereference() issue a warning if > we don't

Re: [PATCH] seqlock: fix raw_read_seqcount_latch()

2016-05-22 Thread Peter Zijlstra
On Sat, May 21, 2016 at 11:14:49PM +0300, Alexey Dobriyan wrote: > lockless_dereference() is supposed to take pointer not integer. Urgh :/ Is there any way we can make lockless_dereference() issue a warning if we don't feed it a pointer? Would something like so work? All pointer types should sil