summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Goodbody <[email protected]>2025-07-30 17:52:56 +0100
committerPeng Fan <[email protected]>2025-09-01 10:33:09 +0800
commit95994d4e5996610c8205597b2849b48eaaf2baff (patch)
treedf8cc845748fa26072a899629172f3f727a8a3da
parentad197b31b3f88d53c349995d8bbaeba4b18b8f2b (diff)
mmc: iproc_sdhci: Cannot test unsigned variable for negative
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. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
-rw-r--r--drivers/mmc/iproc_sdhci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/iproc_sdhci.c b/drivers/mmc/iproc_sdhci.c
index 7ab74ff117a..654672a546f 100644
--- a/drivers/mmc/iproc_sdhci.c
+++ b/drivers/mmc/iproc_sdhci.c
@@ -182,7 +182,7 @@ static int sdhci_iproc_execute_tuning(struct mmc *mmc, u8 opcode)
u32 ctrl;
u32 blocksize = SDHCI_MAKE_BLKSZ(SDHCI_DEFAULT_BOUNDARY_ARG, 64);
struct sdhci_host *host = dev_get_priv(mmc->dev);
- char tuning_loop_counter = MAX_TUNING_LOOP;
+ s8 tuning_loop_counter = MAX_TUNING_LOOP;
int ret = 0;
sdhci_start_tuning(host);