]> git.baikalelectronics.ru Git - kernel.git/commit
perf/arm-cmn: Streamline node iteration
authorRobin Murphy <robin.murphy@arm.com>
Fri, 3 Dec 2021 11:44:54 +0000 (11:44 +0000)
committerWill Deacon <will@kernel.org>
Tue, 14 Dec 2021 12:09:27 +0000 (12:09 +0000)
commit88cbca9b54f44dd6f99dc150e3f9ddb7bdae5222
tree88e79a56287dcd1a9860a2d6ab4ea36e52fcf576
parent309035d34b6d9828754a3c25f1c68ab5a4a37621
perf/arm-cmn: Streamline node iteration

Refactor the places where we scan through the set of nodes to switch
from explicit array indexing to pointer-based iteration. This leads to
slightly simpler object code, but also makes the source less dense and
more pleasant for further development. It also unearths an almost-bug
in arm_cmn_event_init() where we've been depending on the "array index"
of NULL relative to cmn->dns being a sufficiently large number, yuck.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/ee0c9eda9a643f46001ac43aadf3f0b1fd5660dd.1638530442.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm-cmn.c