]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: sh: rz-ssi: Use a do-while loop in rz_ssi_pio_recv()
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Tue, 25 Jan 2022 13:24:55 +0000 (13:24 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 25 Jan 2022 13:51:16 +0000 (13:51 +0000)
commit6eb878c5d4080d42f70cbc4ea6bd822d56325a6c
tree9f751301ae2744bfe2cf6f52a33f8a7d1be4aa64
parent061697525dba6f7bfbd4785e30b8880a0e10e94b
ASoC: sh: rz-ssi: Use a do-while loop in rz_ssi_pio_recv()

Use a do-while loop while reading the samples from RX FIFO. The "done"
flag was only changed as an outcome of the last if-statement (last step)
in this entire procedure. This patch moves the condition from if
statement to while and drops the "done" variable for readability.

While at it, also drop the unneeded parentheses around runtime->dma_area.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20220125132457.14984-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rz-ssi.c