spi: bcm2835: Micro-optimise FIFO loops
authorRobin Murphy <robin.murphy@arm.com>
Tue, 16 Jun 2020 00:09:29 +0000 (01:09 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 1 Jul 2020 21:19:31 +0000 (22:19 +0100)
commit26751de25d255eab7132a8024a893609456996e6
treeadc12a0981341388ab0b16932168cfe176ff12ca
parentafe7e36360f4c981fc03ef07a81cb4ce3d567325
spi: bcm2835: Micro-optimise FIFO loops

The blind and counted loops are always called with nonzero count, so
convert them to do-while loops that lead to slightly more efficient
code generation. With GCC 8.3 this shaves off 1-2 instructions per
iteration in each case.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/9242863077acf9a64e4b3720e479855b88d19e82.1592261248.git.robin.murphy@arm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-bcm2835.c