OSDN Git Service

soc: ti: replace usage of found with dedicated list iterator variable
authorJakob Koschel <jakobkoschel@gmail.com>
Thu, 24 Mar 2022 07:25:03 +0000 (08:25 +0100)
committerNishanth Menon <nm@ti.com>
Mon, 11 Apr 2022 13:45:56 +0000 (08:45 -0500)
commitd281a982c2693c6a7bffaa1ae1ff3b400d6e6c74
treeb0ef579ce66063ff3eeb37eea59a3f9b4f547600
parentc2b0390132edffad1b52e4e84f797343b10f5ef2
soc: ti: 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.

Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/
Link: https://lore.kernel.org/r/20220324072503.63244-1-jakobkoschel@gmail.com
drivers/soc/ti/knav_dma.c
drivers/soc/ti/knav_qmss_queue.c