diff options
| author | Peter Zijlstra <peterz@infradead.org> | 2023-05-26 12:23:48 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-02-23 09:12:51 +0100 |
| commit | 3c6cc62ce1265aa5623e2e1b29c0fe258bf6e232 (patch) | |
| tree | af34aa7214180cc96028323388cd009eb05bba00 /scripts/checkpatch.pl | |
| parent | 579cfab21b59fbf4bba2a564c5810ad72e7f868a (diff) | |
| download | linux-3c6cc62ce1265aa5623e2e1b29c0fe258bf6e232.tar.gz linux-3c6cc62ce1265aa5623e2e1b29c0fe258bf6e232.tar.bz2 linux-3c6cc62ce1265aa5623e2e1b29c0fe258bf6e232.zip | |
locking: Introduce __cleanup() based infrastructure
commit 54da6a0924311c7cf5015533991e44fb8eb12773 upstream.
Use __attribute__((__cleanup__(func))) to build:
- simple auto-release pointers using __free()
- 'classes' with constructor and destructor semantics for
scope-based resource management.
- lock guards based on the above classes.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20230612093537.614161713%40infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/checkpatch.pl')
| -rwxr-xr-x | scripts/checkpatch.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 1e5e66ae5a52..ecf4250b0d2d 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4971,7 +4971,7 @@ sub process { if|for|while|switch|return|case| volatile|__volatile__| __attribute__|format|__extension__| - asm|__asm__)$/x) + asm|__asm__|scoped_guard)$/x) { # cpp #define statements have non-optional spaces, ie # if there is a space between the name and the open |
