mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 16:01:44 -04:00
wifi: iwlwifi: acpi: better use ARRAY_SIZE than a define
Since we'll have to change things in this area, use the safer option to define the size of an array. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20260319110722.1acfc3b6f2b8.I2185e7850146e15628f8ec2c579d93f536c83d83@changeid
This commit is contained in:
committed by
Miri Korenblit
parent
5971e08b13
commit
64b992ebf1
@@ -504,7 +504,8 @@ iwl_acpi_parse_chains_table(union acpi_object *table,
|
||||
u8 num_chains, u8 num_sub_bands)
|
||||
{
|
||||
for (u8 chain = 0; chain < num_chains; chain++) {
|
||||
for (u8 subband = 0; subband < BIOS_SAR_MAX_SUB_BANDS_NUM;
|
||||
for (u8 subband = 0;
|
||||
subband < ARRAY_SIZE(chains[chain].subbands);
|
||||
subband++) {
|
||||
/* if we don't have the values, use the default */
|
||||
if (subband >= num_sub_bands) {
|
||||
|
||||
Reference in New Issue
Block a user