[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zdd8ukxdhH16vRDJ@smile.fi.intel.com>
Date: Thu, 22 Feb 2024 18:56:26 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Herve Codina <herve.codina@...tlin.com>
Cc: Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Yury Norov <yury.norov@...il.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, Andrew Lunn <andrew@...n.ch>,
Mark Brown <broonie@...nel.org>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v4 1/5] net: wan: Add support for QMC HDLC
On Thu, Feb 22, 2024 at 05:45:01PM +0100, Herve Codina wrote:
> On Thu, 22 Feb 2024 17:29:05 +0200
> Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:
> > On Thu, Feb 22, 2024 at 03:22:14PM +0100, Herve Codina wrote:
..
> > > + spin_lock_irqsave(&qmc_hdlc->tx_lock, flags);
> >
> > Why not using cleanup.h from day 1?
>
> I don't know about cleanup.h.
> Can you tell me more ?
> How should I use it ?
>
> > > +end:
> >
> > This label, in particular, will not be needed with above in place.
> >
> > > + spin_unlock_irqrestore(&qmc_hdlc->tx_lock, flags);
> > > + return ret;
> > > +}
Here are the examples:
6191e49de389 ("pinctrl: baytrail: Simplify code with cleanup helpers")
1d1b4770d4b6 ("platform/x86/intel/vsec: Use cleanup.h")
e2eeddefb046 ("pstore: inode: Convert mutex usage to guard(mutex)")
Some advanced stuff:
ced085ef369a ("PCI: Introduce cleanup helpers for device reference counts and locks")
Hope this helps.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists