| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | coccinelle: misc: restrict patch mode in flexible_array.cocci | Denis Efremov | 2021-05-01 | 1 | -2/+21 |
| | | | | | | | | | | | | Skip patches generation for structs with a single field. Changing a zero-length array to a flexible array member in a struct with no named members breaks the compilation. However, reporting such cases is still valuable, e.g. commit 637464c59e0b ("ACPI: NFIT: Fix flexible_array.cocci warnings"). Signed-off-by: Denis Efremov <efremov@linux.com> Signed-off-by: Julia Lawall <julia.lawall@inria.fr> | ||||
| * | coccinelle: misc: add flexible_array.cocci script | Denis Efremov | 2020-10-03 | 1 | -0/+88 |
| One-element and zero-length arrays are deprecated [1]. Kernel code should always use "flexible array members" instead, except for existing uapi definitions. The script warns about one-element and zero-length arrays in structs. [1] commit 68e4cd17e218 ("docs: deprecated.rst: Add zero-length and one-element arrays") Cc: Kees Cook <keescook@chromium.org> Cc: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Denis Efremov <efremov@linux.com> Signed-off-by: Julia Lawall <julia.lawall@inria.fr> | |||||
