aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-sub-ui.c
diff options
context:
space:
mode:
authorLinus Walleij <[email protected]>2023-06-16 22:42:20 +0200
committerUlf Hansson <[email protected]>2023-06-19 13:14:26 +0200
commit479d8e61f6244286e629e157ea831e8c4f783826 (patch)
treef3db6c5625ecf6ea6b9c052f30682f52ce602be6 /lib/mpi/mpi-sub-ui.c
parent2673493fdfe78a1a8df1f802755cc2448ca98df6 (diff)
mmc: mmci: Unwind big if() clause
This does two things: firsr replace the hard-to-read long if-expression: if (!host->busy_status && !(status & err_msk) && (readl(base + MMCISTATUS) & host->variant->busy_detect_flag)) { With the more readable: if (!host->busy_status && !(status & err_msk)) { status = readl(base + MMCISTATUS); if (status & host->variant->busy_detect_flag) { Second notice that the re-read MMCISTATUS register is now stored into the status variable, using logic OR because what if something else changed too? While we are at it, explain what the function is doing. Signed-off-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions