diff options
author | Christophe JAILLET <[email protected]> | 2023-10-01 09:44:04 +0200 |
---|---|---|
committer | Miquel Raynal <[email protected]> | 2023-10-16 11:16:51 +0200 |
commit | 1cfa2f76afb1fdedfbcbd83973a233e60c3e7add (patch) | |
tree | 7a73390b9e0ec0e3455833a35dd06accdb79664f /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | f693b6485e251ddf849d862cf6406a4dfc0143b3 (diff) |
mtd: rawnand: rockchip: Use struct_size()
Use struct_size() instead of hand writing it.
This is less verbose and more robust.
While at it, prepare for the coming implementation by GCC and Clang of the
__counted_by attribute. Flexible array members annotated with __counted_by
can have their accesses bounds-checked at run-time checking via
CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for
strcpy/memcpy-family functions).
Also remove a useless comment about the position of a flex-array in a
structure.
Signed-off-by: Christophe JAILLET <[email protected]>
Reviewed-by: Gustavo A. R. Silva <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Acked-by: Heiko Stuebner <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/481721c2c7fe570b4027dbe231d523961c953d5a.1696146232.git.christophe.jaillet@wanadoo.fr
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions