From: Adrian Hunter Date: Tue, 4 Nov 2014 10:42:37 +0000 (+0200) Subject: mmc: sdhci: Fix ADMA table size warning X-Git-Tag: firefly_0821_release~176^2~2782^2~67 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b521cf34bb6b4d38d66176f7cd7337846ac27342;p=firefly-linux-kernel-4.4.55.git 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: Adrian Hunter Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index e7593578d5b2..4436f77f5d38 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -555,7 +555,7 @@ static int sdhci_adma_table_pre(struct sdhci_host *host, * If this triggers then we have a calculation bug * 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) {