]> www.infradead.org Git - users/jedix/linux-maple.git/commit
RDMA/irdma: Annotate flexible array with __counted_by() in struct irdma_qvlist_info
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 19 May 2024 07:02:15 +0000 (09:02 +0200)
committerLeon Romanovsky <leon@kernel.org>
Thu, 30 May 2024 12:14:19 +0000 (15:14 +0300)
commit38c02d813aa321c0e79b9887da6a2e2b57a75698
tree5866f5c7e5cb84ec25465d7338ae229e63d51ed0
parent435cdbe9f7a879209807a7519512f94f0b4367c3
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: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/2ca8b14adf79c4795d7aa95bbfc79253a6bfed82.1716102112.git.christophe.jaillet@wanadoo.fr
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/irdma/main.h