Skip to content

Commit 9002ba6

Browse files
panjaneyjmberg-intel
authored andcommitted
wifi: iwlwifi: mvm: Fix bit size calculation in iwl_dbgfs_tas_get_status_read
Corrected the bit size calculation in the for_each_set_bit macro in the iwl_dbgfs_tas_get_status_read(). The previous implementation used sizeof(dyn_status), which only accounts for the number of bytes. This has been updated to TAS_DYNA_STATUS_MAX to ensure the loop iterates over the correct number of valid bits in dyn_status. Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250308231427.65d373e4a10e.If2cea63035333b07849e5a2c2a4f5dc5c5239595@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent b2e7098 commit 9002ba6

File tree

1 file changed

+3
-5
lines changed
  • drivers/net/wireless/intel/iwlwifi/mvm

1 file changed

+3
-5
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -698,11 +698,9 @@ static ssize_t iwl_dbgfs_tas_get_status_read(struct file *file,
698698

699699
pos += scnprintf(pos, endpos - pos, "Dynamic status:\n");
700700
dyn_status = (rsp->tas_status_mac[i].dynamic_status);
701-
for_each_set_bit(tmp, &dyn_status, sizeof(dyn_status)) {
702-
if (tmp >= 0 && tmp < TAS_DYNA_STATUS_MAX)
703-
pos += scnprintf(pos, endpos - pos,
704-
"\t%s (%d)\n",
705-
tas_current_status[tmp], tmp);
701+
for_each_set_bit(tmp, &dyn_status, TAS_DYNA_STATUS_MAX) {
702+
pos += scnprintf(pos, endpos - pos, "\t%s (%d)\n",
703+
tas_current_status[tmp], tmp);
706704
}
707705

708706
pos += scnprintf(pos, endpos - pos,

0 commit comments

Comments
 (0)