Re: [PATCH v3 49/56] refcount.h: fix a kernel-doc markup

From: Peter Zijlstra
Date: Mon Oct 26 2020 - 05:39:36 EST


On Mon, Oct 26, 2020 at 10:16:20AM +0100, Mauro Carvalho Chehab wrote:
> Em Mon, 26 Oct 2020 09:10:59 +0100
> Peter Zijlstra <peterz@xxxxxxxxxxxxx> escreveu:
>
> > On Sat, Oct 24, 2020 at 08:28:27AM +0200, Mauro Carvalho Chehab wrote:
> > > If the intent is to document the struct and its internal fields,
> > > this kernel-doc should work:
> > >
> > > /**
> > > * struct refcount_struct - variant of atomic_t specialized for reference counts
> > > * @refs: atomic_t counter field
> > > *
> > > * The counter saturates at REFCOUNT_SATURATED and will not move once
> > > * there. This avoids wrapping the counter and causing 'spurious'
> > > * use-after-free bugs.
> > > */
> > >
> > > Which produces this result:
> >
> > Who cares... :-(
>
> Anyone that would need to use refcount_t, instead of atomic_t.

They can read the .h file just fine today.