On Tue, 3 Dec 2024 at 01:05, Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> wrote: > > On Thu, Nov 28, 2024 at 4:16 PM Kumar Kartikeya Dwivedi > <memxor@xxxxxxxxx> > enum ref_state_type { > > - REF_TYPE_PTR = 0, > > - REF_TYPE_LOCK, > > + REF_TYPE_PTR = 1, > > + REF_TYPE_IRQ = 2, > > + > > + REF_TYPE_LOCK = 3, > > } type; > > why extra empty line? > To separate the lock types from others, but I can drop it. > why renumber ? To ensure we don't get assigned REF_TYPE_PTR by default after acquire_reference_state, if someone forgets to assign the type it will be REF_TYPE_PTR. Right now with 1 it will get caught by refsafe's default WARN. I caused this myself so decided it's better to be more explicit.