]> git.dujemihanovic.xyz Git - u-boot.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)
commit6579bb00cf4f072084a02e806b214eed95a9e5bc
treea2e6e8e454b8f11d54735f51937ddcfa9ccc105d
parent2a165956ac804ebd825ba9eaf4fe26c9bbfb8925
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