Smatch reported unreachable code in blk-uclass.c which led to noticing that uclass_find_next_device always returned 0 which meant it had no need of any return value.
Signed-off-by: Andrew Goodbody <andrew.goodb...@linaro.org> --- Changes in v3: - Address review comments to make more readable and prevent for loop testing of a variable that will not change - Remove those for loops that reduce to being empty - Link to v2: https://lore.kernel.org/r/20250714-blk-uclass-v2-0-1bb1d2eee...@linaro.org Changes in v2: - make uclass_find_next_device a void and update callers - Link to v1: https://lore.kernel.org/r/20250714-blk-uclass-v1-1-d21428c5f...@linaro.org --- Andrew Goodbody (2): block: Remove unreachable code uclass: Cleanup uclass_find_next_device board/emulation/qemu-ppce500/qemu-ppce500.c | 4 +- boot/bootdev-uclass.c | 8 +- cmd/regulator.c | 8 +- drivers/block/blk-uclass.c | 14 +-- drivers/core/uclass.c | 16 +--- drivers/power/regulator/regulator-uclass.c | 21 ++-- drivers/remoteproc/rproc-uclass.c | 9 +- include/dm/uclass-internal.h | 4 +- test/dm/core.c | 143 +++++++++++----------------- 9 files changed, 94 insertions(+), 133 deletions(-) --- base-commit: cd79a2839b01571b6f2915c219f71c05e3c97482 change-id: 20250714-blk-uclass-34684c01f60c Best regards, -- Andrew Goodbody <andrew.goodb...@linaro.org>