提交 d84075c8 编写于 作者: P Pierre Ossman

mmc: replace BUG_ON with WARN_ON

Replace all cases of BUG_ON with WARN_ON where there is a chance
(with varying degrees of slim) that the kernel can continue without
incidence.
Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
上级 9f2fcf99
......@@ -202,7 +202,7 @@ int mmc_wait_for_cmd(struct mmc_host *host, struct mmc_command *cmd, int retries
{
struct mmc_request mrq;
BUG_ON(!host->claimed);
WARN_ON(!host->claimed);
memset(&mrq, 0, sizeof(struct mmc_request));
......@@ -333,7 +333,7 @@ void mmc_release_host(struct mmc_host *host)
{
unsigned long flags;
BUG_ON(!host->claimed);
WARN_ON(!host->claimed);
spin_lock_irqsave(&host->lock, flags);
host->claimed = 0;
......@@ -531,7 +531,7 @@ void mmc_attach_bus(struct mmc_host *host, const struct mmc_bus_ops *ops)
BUG_ON(!host);
BUG_ON(!ops);
BUG_ON(!host->claimed);
WARN_ON(!host->claimed);
spin_lock_irqsave(&host->lock, flags);
......@@ -555,8 +555,8 @@ void mmc_detach_bus(struct mmc_host *host)
BUG_ON(!host);
BUG_ON(!host->claimed);
BUG_ON(!host->bus_ops);
WARN_ON(!host->claimed);
WARN_ON(!host->bus_ops);
spin_lock_irqsave(&host->lock, flags);
......@@ -584,7 +584,7 @@ void mmc_detect_change(struct mmc_host *host, unsigned long delay)
#ifdef CONFIG_MMC_DEBUG
unsigned long flags;
spin_lock_irqsave(&host->lock, flags);
BUG_ON(host->removed);
WARN_ON(host->removed);
spin_unlock_irqrestore(&host->lock, flags);
#endif
......
......@@ -264,7 +264,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
unsigned int max_dtr;
BUG_ON(!host);
BUG_ON(!host->claimed);
WARN_ON(!host->claimed);
/*
* Since we're changing the OCR value, we seem to
......@@ -558,7 +558,7 @@ int mmc_attach_mmc(struct mmc_host *host, u32 ocr)
int err;
BUG_ON(!host);
BUG_ON(!host->claimed);
WARN_ON(!host->claimed);
mmc_attach_bus(host, &mmc_ops);
......
......@@ -166,8 +166,6 @@ static int mmc_decode_scr(struct mmc_card *card)
unsigned int scr_struct;
u32 resp[4];
BUG_ON(!mmc_card_sd(card));
resp[3] = card->raw_scr[1];
resp[2] = card->raw_scr[0];
......@@ -300,7 +298,7 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
unsigned int max_dtr;
BUG_ON(!host);
BUG_ON(!host->claimed);
WARN_ON(!host->claimed);
/*
* Since we're changing the OCR value, we seem to
......@@ -620,7 +618,7 @@ int mmc_attach_sd(struct mmc_host *host, u32 ocr)
int err;
BUG_ON(!host);
BUG_ON(!host->claimed);
WARN_ON(!host->claimed);
mmc_attach_bus(host, &mmc_sd_ops);
......
......@@ -230,7 +230,7 @@ int mmc_attach_sdio(struct mmc_host *host, u32 ocr)
struct mmc_card *card;
BUG_ON(!host);
BUG_ON(!host->claimed);
WARN_ON(!host->claimed);
mmc_attach_bus(host, &mmc_sdio_ops);
......
......@@ -125,7 +125,7 @@ static int sdio_card_irq_get(struct mmc_card *card)
{
struct mmc_host *host = card->host;
BUG_ON(!host->claimed);
WARN_ON(!host->claimed);
if (!host->sdio_irqs++) {
atomic_set(&host->sdio_irq_thread_abort, 0);
......@@ -145,7 +145,7 @@ static int sdio_card_irq_put(struct mmc_card *card)
{
struct mmc_host *host = card->host;
BUG_ON(!host->claimed);
WARN_ON(!host->claimed);
BUG_ON(host->sdio_irqs < 1);
if (!--host->sdio_irqs) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册