Commit b521cf34 authored by Adrian Hunter's avatar Adrian Hunter Committed by Ulf Hansson

mmc: sdhci: Fix ADMA table size warning

The intent of the warning is to warn if the ADMA table
overflows.  However there can be one more 'end' entry
so the condition should be adjusted accordingly.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 8be78c6a
...@@ -555,7 +555,7 @@ static int sdhci_adma_table_pre(struct sdhci_host *host, ...@@ -555,7 +555,7 @@ static int sdhci_adma_table_pre(struct sdhci_host *host,
* If this triggers then we have a calculation bug * If this triggers then we have a calculation bug
* somewhere. :/ * somewhere. :/
*/ */
WARN_ON((desc - host->adma_desc) > ADMA_SIZE); WARN_ON((desc - host->adma_desc) >= ADMA_SIZE);
} }
if (host->quirks & SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC) { if (host->quirks & SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment