Commit 38c02d81 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Leon Romanovsky

RDMA/irdma: Annotate flexible array with __counted_by() in struct irdma_qvlist_info

'num_vectors' is used to count the number of elements in the 'qv_info'
flexible array in "struct irdma_qvlist_info".

So annotate it with __counted_by() to make it explicit and enable some
additional checks.

This allocation is done in irdma_save_msix_info().
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/2ca8b14adf79c4795d7aa95bbfc79253a6bfed82.1716102112.git.christophe.jaillet@wanadoo.frAcked-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent 435cdbe9
......@@ -239,7 +239,7 @@ struct irdma_qv_info {
struct irdma_qvlist_info {
u32 num_vectors;
struct irdma_qv_info qv_info[];
struct irdma_qv_info qv_info[] __counted_by(num_vectors);
};
struct irdma_gen_ops {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment