Browse Source

scripts/checkpatch: add `__unused` to the `$Attribute` list

Add `__unused` to the `$Attribute` family along with its
`__maybe_unused`, `__always_unused` & `__used` brothers, so
that:

```c
__unused int ret;
```

is recognized as variable declaration, and doesn't raise
`LINE_SPACING` warning in CI.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
pull/65737/head
Yong Cong Sin 2 years ago committed by Fabio Baltieri
parent
commit
ecb2df0444
  1. 1
      scripts/checkpatch.pl

1
scripts/checkpatch.pl

@ -389,6 +389,7 @@ our $Attribute = qr{ @@ -389,6 +389,7 @@ our $Attribute = qr{
__always_unused|
__noreturn|
__used|
__unused|
__cold|
__pure|
__noclone|

Loading…
Cancel
Save