checkpatch: Allow spaces after all coroutine annotations
PATCH 1/1 checkpatch: Allow spaces after all coroutine annotations
The coroutine annotations may be used in the declaration of function pointers, which triggers checkpatch due to the space before the parentheses. E.g:
int coroutine_fn (*run)(Job *job, Error **errp);
^The coroutine_fn annotation is already included in the list of terms where spaces are allowed. Add the other coroutine annotations:coroutine_mixed_fn and no_coroutine_fn.
---
the next migration PR will trigger this
--- scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+)
scripts/checkpatch.pl +1 -0
@@ -2441,6 +2441,7 @@ sub process { if ($name =~ /^(?: if|for|while|switch|return|case| volatile|__volatile__|coroutine_fn| + coroutine_mixed_fn|no_coroutine_fn| __attribute__|format|__extension__| asm|__asm__)$/x) {
Signature · 1 line
2.51.0
Quoted 22 lines · Fabiano Rosas
The coroutine annotations may be used in the declaration of function pointers, which triggers checkpatch due to the space before the parentheses. E.g:
int coroutine_fn (*run)(Job *job, Error **errp); ^The
coroutine_fnannotation is already included in the list of terms where spaces are allowed. Add the other coroutine annotations:coroutine_mixed_fnandno_coroutine_fn.Signed-off-by Fabiano Rosas <[email protected]>---
the next migration PR will trigger this--- scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+)scripts/checkpatch.pl +0
-0
scripts/checkpatch.pl sub process { · line 2447
Quoted 7 lines
scripts/checkpatch.pl +1
-0@@ -2441,6 +2441,7 @@ sub process { if ($name =~ /^(?: if|for|while|switch|return|case| volatile|__volatile__|coroutine_fn| + coroutine_mixed_fn|no_coroutine_fn| __attribute__|format|__extension__| asm|__asm__)$/x) {
Am 20.04.2026 um 21:13 hat Fabiano Rosas geschrieben:
Quoted 11 lines
The coroutine annotations may be used in the declaration of function pointers, which triggers checkpatch due to the space before the parentheses. E.g:
int coroutine_fn (*run)(Job *job, Error **errp); ^The
coroutine_fnannotation is already included in the list of terms where spaces are allowed. Add the other coroutine annotations:coroutine_mixed_fnandno_coroutine_fn.Signed-off-by Fabiano Rosas <[email protected]>