[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50385582-d0ae-4288-8435-8db5f5f69a13@lunn.ch>
Date: Thu, 9 May 2024 15:24:33 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Sabrina Dubroca <sd@...asysnail.net>
Cc: Antonio Quartulli <antonio@...nvpn.net>, netdev@...r.kernel.org,
Jakub Kicinski <kuba@...nel.org>,
Sergey Ryazanov <ryazanov.s.a@...il.com>,
Paolo Abeni <pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>,
Esben Haabendal <esben@...nix.com>
Subject: Re: [PATCH net-next v3 07/24] ovpn: introduce the ovpn_peer object
On Thu, May 09, 2024 at 03:04:36PM +0200, Sabrina Dubroca wrote:
> 2024-05-08, 22:31:51 +0200, Antonio Quartulli wrote:
> > On 08/05/2024 18:06, Sabrina Dubroca wrote:
> > > 2024-05-06, 03:16:20 +0200, Antonio Quartulli wrote:
> > > > diff --git a/drivers/net/ovpn/ovpnstruct.h b/drivers/net/ovpn/ovpnstruct.h
> > > > index ee05b8a2c61d..b79d4f0474b0 100644
> > > > --- a/drivers/net/ovpn/ovpnstruct.h
> > > > +++ b/drivers/net/ovpn/ovpnstruct.h
> > > > @@ -17,12 +17,19 @@
> > > > * @dev: the actual netdev representing the tunnel
> > > > * @registered: whether dev is still registered with netdev or not
> > > > * @mode: device operation mode (i.e. p2p, mp, ..)
> > > > + * @lock: protect this object
> > > > + * @event_wq: used to schedule generic events that may sleep and that need to be
> > > > + * performed outside of softirq context
> > > > + * @peer: in P2P mode, this is the only remote peer
> > > > * @dev_list: entry for the module wide device list
> > > > */
> > > > struct ovpn_struct {
> > > > struct net_device *dev;
> > > > bool registered;
> > > > enum ovpn_mode mode;
> > > > + spinlock_t lock; /* protect writing to the ovpn_struct object */
> > >
> > > nit: the comment isn't really needed since you have kdoc saying the same thing
> >
> > True, but checkpatch.pl (or some other script?) was still throwing a
> > warning, therefore I added this comment to silence it.
>
> Ok, then I guess the comment (and the other one below) can stay. That
> sounds like a checkpatch.pl bug.
I suspect it is more complex than that. checkpatch does not understand
kdoc. It just knows the rule that there should be a comment next to a
lock, hopefully indicating what the lock protects. In order to fix
this, checkpatch would need to somehow invoke the kdoc parser, and ask
it if the lock has kdoc documentation.
I suspect we are just going to have to live with this.
Andrew
Powered by blists - more mailing lists