mmc: rockchip_sdhci: Do not test unsigned for being less than 0
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Thu, 31 Jul 2025 11:46:10 +0000 (12:46 +0100)
committerKever Yang <kever.yang@rock-chips.com>
Sat, 30 Aug 2025 15:33:32 +0000 (23:33 +0800)
commit97b0f9f8ce4fc8d994fad60660e1daba2da190e9
tree0336a082aa38fc14e8bf06acd89c74836f05453c
parent1961bba4bc341573db98a6fd34eac771e914681f
mmc: rockchip_sdhci: Do not test unsigned for being less than 0

In rockchip_sdhci_execute_tuning the variable tuning_loop_counter is
tested for being less than 0. Ensure that it is a signed type by
declaring it as s8 instead of char.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
drivers/mmc/rockchip_sdhci.c