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>
This commit is contained in:
committed by
Leon Romanovsky
parent
435cdbe9f7
commit
38c02d813a
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user