Skip to contentSkip to conversation

mmc: sdhci-s3c: Mark expected switch fall-through

PATCH In review Gustavo A. R. Silva 3 participants 3 messages Jul 29, 2019 – Aug 2, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: sdhci-s3c: Mark expected switch fall-through

Mark switch cases where we are expecting to fall through.

This patch fixes the following warnings:

drivers/mmc/host/sdhci-s3c.c: In function 'sdhci_s3c_probe':
drivers/mmc/host/sdhci-s3c.c:613:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
host->mmc->caps |= MMC_CAP_8_BIT_DATA;
drivers/mmc/host/sdhci-s3c.c:614:2: note: here
case 4:
^~~~

---
 drivers/mmc/host/sdhci-s3c.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mmc/host/sdhci-s3c.c +1 -0
index 8e4a8ba33f05..cefa0fb8cfde 100644
@@ -611,6 +611,7 @@ static int sdhci_s3c_probe(struct platform_device *pdev)
 	switch (pdata->max_width) {
 	case 8:
 		host->mmc->caps |= MMC_CAP_8_BIT_DATA;
+		/* Fall through */
 	case 4:
 		host->mmc->caps |= MMC_CAP_4_BIT_DATA;
 		break;
Signature · 1 line
2.22.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Gustavo A. R. Silva

Mark switch cases where we are expecting to fall through.

This patch fixes the following warnings:

drivers/mmc/host/sdhci-s3c.c: In function 'sdhci_s3c_probe':
drivers/mmc/host/sdhci-s3c.c:613:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
host->mmc->caps |= MMC_CAP_8_BIT_DATA;
drivers/mmc/host/sdhci-s3c.c:614:2: note: here
case 4:
^~~~

Quoted 2 lines
Quoted 17 lines
---
 drivers/mmc/host/sdhci-s3c.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mmc/host/sdhci-s3c.c +1 -0
index 8e4a8ba33f05..cefa0fb8cfde 100644
@@ -611,6 +611,7 @@ static int sdhci_s3c_probe(struct platform_device *pdev)
 	switch (pdata->max_width) {
 	case 8:
 		host->mmc->caps |= MMC_CAP_8_BIT_DATA;
+		/* Fall through */
 	case 4:
 		host->mmc->caps |= MMC_CAP_4_BIT_DATA;
 		break;
#2 lore raw
In reply to Gustavo A. R. Silva
Quoted 12 lines · Gustavo A. R. Silva

Mark switch cases where we are expecting to fall through.

This patch fixes the following warnings:

drivers/mmc/host/sdhci-s3c.c: In function 'sdhci_s3c_probe':
drivers/mmc/host/sdhci-s3c.c:613:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
host->mmc->caps |= MMC_CAP_8_BIT_DATA;
drivers/mmc/host/sdhci-s3c.c:614:2: note: here
case 4:
^~~~

Quoted 2 lines

Applied for next, thanks!

Kind regards
Uffe

Quoted 19 lines
---
 drivers/mmc/host/sdhci-s3c.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mmc/host/sdhci-s3c.c +1 -1
index 8e4a8ba33f05..cefa0fb8cfde 100644
@@ -611,6 +611,7 @@ static int sdhci_s3c_probe(struct platform_device *pdev)
        switch (pdata->max_width) {
        case 8:
                host->mmc->caps |= MMC_CAP_8_BIT_DATA;
+               /* Fall through */
        case 4:
                host->mmc->caps |= MMC_CAP_4_BIT_DATA;
                break;
--

2.22.0