lkml.org 
[lkml]   [2018]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC] Make call_srcu() available during very early boot
On Tue, 14 Aug 2018 10:06:18 -0700
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote:


> > > #define __SRCU_STRUCT_INIT(name, pcpu_name) \
> > > - { \
> > > - .sda = &pcpu_name, \
> > > - .lock = __SPIN_LOCK_UNLOCKED(name.lock), \
> > > - .srcu_gp_seq_needed = 0 - 1, \
> > > - __SRCU_DEP_MAP_INIT(name) \
> > > - }
> > > +{ \
> > > + .sda = &pcpu_name, \
> > > + .lock = __SPIN_LOCK_UNLOCKED(name.lock), \
> > > + .srcu_gp_seq_needed = 0 - 1, \
> >
> > Interesting initialization of -1. This was there before, but still
> > interesting none the less.
>
> If I recall correctly, this subterfuge suppresses compiler complaints
> about initializing an unsigned long with a negative number. :-/

Did you try:

.srcu_gp_seq_needed = -1UL,

?

-- Steve

\
 
 \ /
  Last update: 2018-08-14 20:13    [W:0.119 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site