Re: [PATCH 1/4] gpiolib: cdev: relocate debounce_period_us from struct gpio_desc

From: Kent Gibson
Date: Wed Dec 13 2023 - 21:15:23 EST


On Thu, Dec 14, 2023 at 08:18:01AM +0800, Kent Gibson wrote:
> On Wed, Dec 13, 2023 at 10:07:12PM +0200, Andy Shevchenko wrote:
> > On Wed, Dec 13, 2023 at 08:03:44PM +0100, Bartosz Golaszewski wrote:
> >
> > ...
> >
> > > > - it adds complications for no benefit
>
> It provides a placeholder for collective documentation and clarifies
> scope for the reader.

Turns out kernel-doc can't deal with a struct variable declaration - it
needs the struct to be named.

So this doesn't parse:

static struct {
struct rb_root tree;
spinlock_t lock;
} supinfo;

but this does:

static struct supinfo {
struct rb_root tree;
spinlock_t lock;
} supinfo;

at which point I prefer the separate struct and var declarations as per
the patch.

Opinions?

Cheers,
Kent.