[PATCH] mmc: iproc_sdhci: Cannot test unsigned variable for negative

Peng Fan peng.fan at oss.nxp.com
Thu Jul 31 10:04:35 CEST 2025


On Wed, Jul 30, 2025 at 05:52:56PM +0100, Andrew Goodbody wrote:
>In sdhci_iproc_execute_tuning the variable tuning_loop_counter is
>unsigned and therefore will always fail the test for it being less than
>0. Fix this by changing the variable type to be s8.
>
>This issue was found by Smatch.
>

Per my understanding GCC default takes char as signed. But after
doing some study, char could be signed or unsigned. So it
make sense to use s8 to avoid potential issue.

Reviewed-by: Peng Fan <peng.fan at nxp.com>

Thanks,
Peng


More information about the U-Boot mailing list