net: dsa: felix: Annotate struct action_gate_entry with __counted_by
authorHongbo Li <lihongbo22@huawei.com>
Wed, 4 Sep 2024 01:49:56 +0000 (09:49 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 5 Sep 2024 11:01:01 +0000 (13:01 +0200)
commit50ddaedeae7562b25e8eeca04f581d7c815be1db
tree4bbe682987f676e1ddf0a30ab06e9b38ea23ecbb
parented42b2bcd38e95a967287273144a7c7a1dbc97cb
net: dsa: felix: Annotate struct action_gate_entry with __counted_by

Add the __counted_by compiler attribute to the flexible array member
entries to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and
CONFIG_FORTIFY_SOURCE.

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Link: https://patch.msgid.link/20240904014956.2035117-1-lihongbo22@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/dsa/ocelot/felix_vsc9959.c