You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scripts: checkpatch.pl: relax Missing a blank line
Relax the `Missing a blank line after declarations` checkpatch error by
loosening the requirements for a macro to be treated as one that
declared a variable.
Currently the regex matches the pattern `DECLARE` or `DEFINE`, as long
as there are between 1 and 6 trailing `_FOO` components to the macro
name (e.g. `DECLARE_MY_TYPE()`). Zephyr however contains many macros
that don't have the trailing components but still resolve to variables
(e.g. `ATOMIC_DEFINE`, `K_MUTEX_DEFINE, etc`).
By changing `{1,6}` to `{0,6}`, we remove the requirement for the
trailing `_FOO` component(s) while still allowing them. This stops
checkpatch from erroring on patterns like this:
```
struct driver_data {
uint16_t some_value;
ATOMIC_DEFINE(some_atomic, 16);
};
```
Signed-off-by: Jordan Yates <[email protected]>
0 commit comments