Files
scst/iscsi-scst/usr
Gleb Chesnokov a1ded333e8 scst: Replace zero-length arrays with flexible-array members
There is a regular need in the kernel to provide a way to declare
having a dynamically sized set of trailing elements in a structure.
Kernel code should always use “flexible array members”[1] for these
cases. The older style of one-element or zero-length arrays should
no longer be used[2].

This code was transformed with the help of Coccinelle:
($ spatch --jobs $(getconf _NPROCESSORS_ONLN) --sp-file script.cocci --include-headers --dir . > output.patch)

@@
identifier S, member, array;
type T1, T2;
@@

struct S {
  ...
  T1 member;
  T2 array[
- 0
  ];
};

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays

Link: https://github.com/KSPP/linux/issues/78
2022-04-03 14:44:17 +03:00
..
2020-10-14 02:15:33 +00:00
2019-03-02 20:04:25 +00:00
2019-05-09 16:26:46 +00:00
2018-04-12 03:49:10 +00:00
2018-04-12 03:49:10 +00:00
2018-04-12 03:49:10 +00:00
2018-04-12 03:49:10 +00:00
2018-04-12 03:49:10 +00:00
2018-04-12 03:49:10 +00:00
2010-04-23 17:50:01 +00:00
2018-04-12 03:49:10 +00:00
2019-05-09 16:26:46 +00:00
2018-04-12 03:49:10 +00:00
2018-04-12 03:49:10 +00:00
2010-04-23 17:50:01 +00:00
2019-05-09 16:26:46 +00:00
2018-04-12 03:49:10 +00:00