Commit 575b9be6 authored by Kees Cook's avatar Kees Cook Committed by Martin K. Petersen
Browse files

scsi: aacraid: union aac_init: Replace 1-element array with flexible array

Replace the deprecated[1] use of a 1-element array in union aac_init with a
modern flexible array.

Additionally add __counted_by annotation since rrq is only ever accessed
after rr_queue_count has been set (with the same value used to control the
loop):

                init->r8.rr_queue_count = cpu_to_le32(dev->max_msix);
		...
                for (i = 0; i < dev->max_msix; i++) {
                        addr = (u64)dev->host_rrq_pa + dev->vector_cap * i *
                                        sizeof(u32);
                        init->r8.rrq[i].host_addr_high = cpu_to_le32(
                                                upper_32_bits(addr));

No binary differences are present after this conversion.

Link: https://github.com/KSPP/linux/issues/79

 [1]
Signed-off-by: default avatarKees Cook <kees@kernel.org>
Link: https://lore.kernel.org/r/20240711174815.work.689-kees@kernel.org


Reviewed-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 29b4a497
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment