]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
mmc: sdhci-msm: fix x86 build error
authorArnd Bergmann <arnd@arndb.de>
Tue, 10 Oct 2017 09:14:16 +0000 (11:14 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 30 Oct 2017 10:46:04 +0000 (11:46 +0100)
The __WARN_printf() function is not portable across architectures
and causes a compile-time error on x86 and others that don't use
the asm-generic version of asm/bug.h:

drivers/mmc/host/sdhci-msm.c: In function 'sdhci_msm_check_power_status':
drivers/mmc/host/sdhci-msm.c:1066:4: error: implicit declaration of function '__WARN_printf'; did you mean '__dev_printk'? [-Werror=implicit-function-declaration]
    __WARN_printf("%s: pwr_irq for req: (%d) timed out\n",
    ^~~~~~~~~~~~~

The change that introduced this error, "mmc: sdhci-msm: Add sdhci msm
register write APIs which wait for pwr irq", likely meant to use
dev_warn(), so I'm changing over to that.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-msm.c

index 85a882b4c541fcbe72a84a1fefc2b5f6eecc6929..3fb7d2eec93f4d72d63dbc5983e47a2b8dbc710d 100644 (file)
@@ -1063,8 +1063,9 @@ static void sdhci_msm_check_power_status(struct sdhci_host *host, u32 req_type)
                if (!wait_event_timeout(msm_host->pwr_irq_wait,
                                msm_host->pwr_irq_flag,
                                msecs_to_jiffies(MSM_PWR_IRQ_TIMEOUT_MS)))
-                       __WARN_printf("%s: pwr_irq for req: (%d) timed out\n",
-                                       mmc_hostname(host->mmc), req_type);
+                       dev_warn(&msm_host->pdev->dev,
+                                "%s: pwr_irq for req: (%d) timed out\n",
+                                mmc_hostname(host->mmc), req_type);
        }
        pr_debug("%s: %s: request %d done\n", mmc_hostname(host->mmc),
                        __func__, req_type);