Commit f758440
checkpatch: exclude forward declarations of const structs
Limit checkpatch warnings for normally-const structs by excluding patterns
consistent with forward declarations.
For example, the forward declaration `struct regmap_access_table;` in a
header file currently generates a warning recommending that it is
generally declared as const; however, this would apply a useless type
qualifier in the empty declaration `const struct regmap_access_table;`,
and subsequently generate compiler warnings.
Link: https://lkml.kernel.org/r/20260331181509.1258693-1-tknelms@google.com
Signed-off-by: Taylor Nelms <tknelms@google.com>
Acked-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent cc82b3d commit f758440
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7512 | 7512 | | |
7513 | 7513 | | |
7514 | 7514 | | |
7515 | | - | |
| 7515 | + | |
7516 | 7516 | | |
7517 | 7517 | | |
7518 | | - | |
| 7518 | + | |
7519 | 7519 | | |
7520 | 7520 | | |
7521 | 7521 | | |
| |||
0 commit comments