]> www.infradead.org Git - users/hch/dma-mapping.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)
commitda5f7d2c8019c9dd053e2d94fdc1b3e7c03c35a5
tree88e79a56287dcd1a9860a2d6ab4ea36e52fcf576
parent5f167eab83f153c2c6f80cfe419e269d5f481b09
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