soc: qcom: pdr: replace usage of found with dedicated list iterator variable
authorJakob Koschel <jakobkoschel@gmail.com>
Thu, 24 Mar 2022 07:24:35 +0000 (08:24 +0100)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 8 Apr 2022 03:20:27 +0000 (22:20 -0500)
commit3be066542ec400e7cdbcef2a6ac1d36c5366a6f6
treeeb24d43a518702336a14a3b7cab2d8a1704e74f8
parent3edff6262c48fe73feedc7277a3a6ebc3ed35a37
soc: qcom: pdr: 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.

Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/
Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220324072435.63070-1-jakobkoschel@gmail.com
drivers/soc/qcom/pdr_interface.c