wifi: iwlwifi: mvm: replace usage of found with dedicated list iterator variable
authorJakob Koschel <jakobkoschel@gmail.com>
Mon, 5 Dec 2022 08:35:42 +0000 (10:35 +0200)
committerGregory Greenman <gregory.greenman@intel.com>
Wed, 7 Dec 2022 15:36:08 +0000 (17:36 +0200)
commit6d7cb4a63db8716d23036323ff1a639cbade52ac
tree6870546b38e5b198cb67f76f14f48ae170eae024
parent838a0c7d144111df7f1fd426d099ab68e81bb24c
wifi: iwlwifi: mvm: replace usage of found with dedicated list iterator variable

To move the list iterator variable into the list_for_each_entry_*()
macro in the future it should be avoided to use the list iterator
variable after the loop body.

To *never* use the list iterator variable after the loop it was
concluded to use a separate iterator variable instead of a
found boolean [1].

This removes the need to use a found variable and simply checking if
the variable was set, can determine if the break/goto was hit.

While at it, stop using the unnecessary _safe() variant.

[1] https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/

Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com>
[change to not use _safe variant]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20221205102808.e4882dc35543.I32b2b945ba234de72ee119fc20f5b8be02b6a3f2@changeid
drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c
drivers/net/wireless/intel/iwlwifi/mvm/time-event.c