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>
This commit is contained in:
Yong Cong Sin 2023-11-24 11:15:53 +08:00 committed by Fabio Baltieri
parent 13f3c6d0bd
commit ecb2df0444

View file

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