]> git.baikalelectronics.ru Git - uboot.git/commit
ide: Refactor confusing loop code
authorSimon Glass <sjg@chromium.org>
Tue, 25 Apr 2023 16:54:38 +0000 (10:54 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 27 Apr 2023 17:51:06 +0000 (13:51 -0400)
commitb1d5ff63bd30c3e2084331279c81ab54977db45f
treea2e6e8e454b8f11d54735f51937ddcfa9ccc105d
parent835e25ea2708d915fc79d1e673b94361d4565e33
ide: Refactor confusing loop code

This code is hard to follow as it uses #ifdef in a strange way. Adjust
it to avoid the preprocessor. Drop the special return for the non-ATAPI
case since we can rely on tries becoming 0 and exiting the loop.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/block/ide.c