summaryrefslogtreecommitdiff
path: root/drivers/scsi/megaraid.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2023-06-16 23:42:20 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2023-06-19 14:14:26 +0300
commit479d8e61f6244286e629e157ea831e8c4f783826 (patch)
treef3db6c5625ecf6ea6b9c052f30682f52ce602be6 /drivers/scsi/megaraid.h
parent2673493fdfe78a1a8df1f802755cc2448ca98df6 (diff)
downloadlinux-479d8e61f6244286e629e157ea831e8c4f783826.tar.xz
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 <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20230405-pl180-busydetect-fix-v7-2-69a7164f2a61@linaro.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/scsi/megaraid.h')
0 files changed, 0 insertions, 0 deletions