Thread (22 messages) 22 messages, 3 authors, 2024-02-29

Re: [PATCH v4 1/5] net: wan: Add support for QMC HDLC

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2024-02-22 16:56:34
Also in: lkml, netdev

On Thu, Feb 22, 2024 at 05:45:01PM +0100, Herve Codina wrote:
On Thu, 22 Feb 2024 17:29:05 +0200
Andy Shevchenko [off-list ref] wrote:
quoted
On Thu, Feb 22, 2024 at 03:22:14PM +0100, Herve Codina wrote:
...
quoted
quoted
+	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 ?
quoted
quoted
+end:  
This label, in particular, will not be needed with above in place.
quoted
+	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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help