diff options
author | Girish K S <girish.shivananjappa@linaro.org> | 2011-10-11 11:44:09 +0530 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-10-26 16:32:22 -0400 |
commit | a3c76eb9d4a1e68a69dd880cf0bcb8a52418b993 (patch) | |
tree | 968fb0009edad3defcda8bb40df21837868705dd /drivers | |
parent | b23cf0bd55b0c6b703982446f679e00d6d929524 (diff) |
mmc: replace printk with appropriate display macro
All the files using printk function for displaying kernel messages
in the mmc driver have been replaced with corresponding macro.
Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers')
28 files changed, 172 insertions, 176 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 2cf1ba6db91..049445eb4f7 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -937,7 +937,7 @@ static int mmc_blk_err_check(struct mmc_card *card, do { int err = get_card_status(card, &status, 5); if (err) { - printk(KERN_ERR "%s: error %d requesting status\n", + pr_err("%s: error %d requesting status\n", req->rq_disk->disk_name, err); return MMC_BLK_CMD_ERR; } @@ -1187,7 +1187,7 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) * were returned by the host controller, it's a bug. */ if (status == MMC_BLK_SUCCESS && ret) { - printk(KERN_ERR "%s BUG rq_tot %d d_xfer %d\n", + pr_err("%s BUG rq_tot %d d_xfer %d\n", __func__, blk_rq_bytes(req), brq->data.bytes_xfered); rqc = NULL; @@ -1467,7 +1467,7 @@ static int mmc_blk_alloc_part(struct mmc_card *card, string_get_size((u64)get_capacity(part_md->disk) << 9, STRING_UNITS_2, cap_str, sizeof(cap_str)); - printk(KERN_INFO "%s: %s %s partition %u %s\n", + pr_info("%s: %s %s partition %u %s\n", part_md->disk->disk_name, mmc_card_id(card), mmc_card_name(card), part_md->part_type, cap_str); return 0; @@ -1511,7 +1511,7 @@ mmc_blk_set_blksize(struct mmc_blk_data *md, struct mmc_card *card) mmc_release_host(card->host); if (err) { - printk(KERN_ERR "%s: unable to set block size to 512: %d\n", + pr_err("%s: unable to set block size to 512: %d\n", md->disk->disk_name, err); return -EINVAL; } @@ -1613,7 +1613,7 @@ static int mmc_blk_probe(struct mmc_card *card) string_get_size((u64)get_capacity(md->disk) << 9, STRING_UNITS_2, cap_str, sizeof(cap_str)); - printk(KERN_INFO "%s: %s %s %s %s\n", + pr_info("%s: %s %s %s %s\n", md->disk->disk_name, mmc_card_id(card), mmc_card_name(card), cap_str, md->read_only ? "(ro)" : ""); diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index d8705add3c9..b038c4a9468 100644 --- a/drivers/mmc/card/mmc_test.c +++ b/drivers/mmc/card/mmc_test.c @@ -251,7 +251,7 @@ static int mmc_test_wait_busy(struct mmc_test_card *test) if (!busy && mmc_test_busy(&cmd)) { busy = 1; if (test->card->host->caps & MMC_CAP_WAIT_WHILE_BUSY) - printk(KERN_INFO "%s: Warning: Host did not " + pr_info("%s: Warning: Host did not " "wait for busy state to end.\n", mmc_hostname(test->card->host)); } @@ -553,7 +553,7 @@ static void mmc_test_print_rate(struct mmc_test_card *test, uint64_t bytes, rate = mmc_test_rate(bytes, &ts); iops = mmc_test_rate(100, &ts); /* I/O ops per sec x 100 */ - printk(KERN_INFO "%s: Transfer of %u sectors (%u%s KiB) took %lu.%09lu " + pr_info("%s: Transfer of %u sectors (%u%s KiB) took %lu.%09lu " "seconds (%u kB/s, %u KiB/s, %u.%02u IOPS)\n", mmc_hostname(test->card->host), sectors, sectors >> 1, (sectors & 1 ? ".5" : ""), (unsigned long)ts.tv_sec, @@ -579,7 +579,7 @@ static void mmc_test_print_avg_rate(struct mmc_test_card *test, uint64_t bytes, rate = mmc_test_rate(tot, &ts); iops = mmc_test_rate(count * 100, &ts); /* I/O ops per sec x 100 */ - printk(KERN_INFO "%s: Transfer of %u x %u sectors (%u x %u%s KiB) took " + pr_info("%s: Transfer of %u x %u sectors (%u x %u%s KiB) took " "%lu.%09lu seconds (%u kB/s, %u KiB/s, " "%u.%02u IOPS, sg_len %d)\n", mmc_hostname(test->card->host), count, sectors, count, @@ -1409,7 +1409,7 @@ static int mmc_test_multi_read_high(struct mmc_test_card *test) static int mmc_test_no_highmem(struct mmc_test_card *test) { - printk(KERN_INFO "%s: Highmem not configured - test skipped\n", + pr_info("%s: Highmem not configured - test skipped\n", mmc_hostname(test->card->host)); return 0; } @@ -1436,7 +1436,7 @@ static int mmc_test_area_map(struct mmc_test_card *test, unsigned long sz, t->max_seg_sz, &t->sg_len, min_sg_len); } if (err) - printk(KERN_INFO "%s: Failed to map sg list\n", + pr_info("%s: Failed to map sg list\n", mmc_hostname(test->card->host)); return err; } @@ -2136,7 +2136,7 @@ static int mmc_test_rw_multiple(struct mmc_test_card *test, return ret; err: - printk(KERN_INFO "[%s] error\n", __func__); + pr_info("[%s] error\n", __func__); return ret; } @@ -2150,7 +2150,7 @@ static int mmc_test_rw_multiple_size(struct mmc_test_card *test, if (rw->do_nonblock_req && ((!pre_req && post_req) || (pre_req && !post_req))) { - printk(KERN_INFO "error: only one of pre/post is defined\n"); + pr_info("error: only one of pre/post is defined\n"); return -EINVAL; } @@ -2691,7 +2691,7 @@ static void mmc_test_run(struct mmc_test_card *test, int testcase) { int i, ret; - printk(KERN_INFO "%s: Starting tests of card %s...\n", + pr_info("%s: Starting tests of card %s...\n", mmc_hostname(test->card->host), mmc_card_id(test->card)); mmc_claim_host(test->card->host); @@ -2702,14 +2702,14 @@ static void mmc_test_run(struct mmc_test_card *test, int testcase) if (testcase && ((i + 1) != testcase)) continue; - printk(KERN_INFO "%s: Test case %d. %s...\n", + pr_info("%s: Test case %d. %s...\n", mmc_hostname(test->card->host), i + 1, mmc_test_cases[i].name); if (mmc_test_cases[i].prepare) { ret = mmc_test_cases[i].prepare(test); if (ret) { - printk(KERN_INFO "%s: Result: Prepare " + pr_info("%s: Result: Prepare " "stage failed! (%d)\n", mmc_hostname(test->card->host), ret); @@ -2739,25 +2739,25 @@ static void mmc_test_run(struct mmc_test_card *test, int testcase) ret = mmc_test_cases[i].run(test); switch (ret) { case RESULT_OK: - printk(KERN_INFO "%s: Result: OK\n", + pr_info("%s: Result: OK\n", mmc_hostname(test->card->host)); break; case RESULT_FAIL: - printk(KERN_INFO "%s: Result: FAILED\n", + pr_info("%s: Result: FAILED\n", mmc_hostname(test->card->host)); break; case RESULT_UNSUP_HOST: - printk(KERN_INFO "%s: Result: UNSUPPORTED " + pr_info("%s: Result: UNSUPPORTED " "(by host)\n", mmc_hostname(test->card->host)); break; case RESULT_UNSUP_CARD: - printk(KERN_INFO "%s: Result: UNSUPPORTED " + pr_info("%s: Result: UNSUPPORTED " "(by card)\n", mmc_hostname(test->card->host)); break; default: - printk(KERN_INFO "%s: Result: ERROR (%d)\n", + pr_info("%s: Result: ERROR (%d)\n", mmc_hostname(test->card->host), ret); } @@ -2768,7 +2768,7 @@ static void mmc_test_run(struct mmc_test_card *test, int testcase) if (mmc_test_cases[i].cleanup) { ret = mmc_test_cases[i].cleanup(test); if (ret) { - printk(KERN_INFO "%s: Warning: Cleanup " + pr_info("%s: Warning: Cleanup " "stage failed! (%d)\n", mmc_hostname(test->card->host), ret); @@ -2778,7 +2778,7 @@ static void mmc_test_run(struct mmc_test_card *test, int testcase) mmc_release_host(test->card->host); - printk(KERN_INFO "%s: Tests completed.\n", + pr_info("%s: Tests completed.\n", mmc_hostname(test->card->host)); } diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index 5196312bb55..fed290ecc24 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c @@ -197,13 +197,13 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, if (bouncesz > 512) { mqrq_cur->bounce_buf = kmalloc(bouncesz, GFP_KERNEL); if (!mqrq_cur->bounce_buf) { - printk(KERN_WARNING "%s: unable to " + pr_warning("%s: unable to " "allocate bounce cur buffer\n", mmc_card_name(card)); } mqrq_prev->bounce_buf = kmalloc(bouncesz, GFP_KERNEL); if (!mqrq_prev->bounce_buf) { - printk(KERN_WARNING "%s: unable to " + pr_warning("%s: unable to " "allocate bounce prev buffer\n", mmc_card_name(card)); kfree(mqrq_cur->bounce_buf); diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index c8c9edb3d7c..2c151e18c9e 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c @@ -1082,7 +1082,7 @@ static int sdio_uart_probe(struct sdio_func *func, return -ENOMEM; if (func->class == SDIO_CLASS_UART) { - printk(KERN_WARNING "%s: need info on UART class basic setup\n", + pr_warning("%s: need info on UART class basic setup\n", sdio_func_id(func)); kfree(port); return -ENOSYS; @@ -1101,23 +1101,23 @@ static int sdio_uart_probe(struct sdio_func *func, break; } if (!tpl) { - printk(KERN_WARNING + pr_warning( "%s: can't find tuple 0x91 subtuple 0 (SUBTPL_SIOREG) for GPS class\n", sdio_func_id(func)); kfree(port); return -EINVAL; } - printk(KERN_DEBUG "%s: Register ID = 0x%02x, Exp ID = 0x%02x\n", + pr_debug("%s: Register ID = 0x%02x, Exp ID = 0x%02x\n", sdio_func_id(func), tpl->data[2], tpl->data[3]); port->regs_offset = (tpl->data[4] << 0) | (tpl->data[5] << 8) | (tpl->data[6] << 16); - printk(KERN_DEBUG "%s: regs offset = 0x%x\n", + pr_debug("%s: regs offset = 0x%x\n", sdio_func_id(func), port->regs_offset); port->uartclk = tpl->data[7] * 115200; if (port->uartclk == 0) port->uartclk = 115200; - printk(KERN_DEBUG "%s: clk %d baudcode %u 4800-div %u\n", + pr_debug("%s: clk %d baudcode %u 4800-div %u\n", sdio_func_id(func), port->uartclk, tpl->data[7], tpl->data[8] | (tpl->data[9] << 8)); } else { diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 393d817ed04..46b6e84d953 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -295,7 +295,7 @@ int mmc_add_card(struct mmc_card *card) } if (mmc_host_is_spi(card->host)) { - printk(KERN_INFO "%s: new %s%s%s card on SPI\n", + pr_info("%s: new %s%s%s card on SPI\n", mmc_hostname(card->host), mmc_card_highspeed(card) ? "high speed " : "", mmc_card_ddr_mode(card) ? "DDR " : "", @@ -334,10 +334,10 @@ void mmc_remove_card(struct mmc_card *card) if (mmc_card_present(card)) { if (mmc_host_is_spi(card->host)) { - printk(KERN_INFO "%s: SPI card removed\n", + pr_info("%s: SPI card removed\n", mmc_hostname(card->host)); } else { - printk(KERN_INFO "%s: card %04x removed\n", + pr_info("%s: card %04x removed\n", mmc_hostname(card->host), card->rca); } device_del(&card->dev); diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index ec769490300..61d7730bc8b 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1541,7 +1541,7 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from, cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_AC; err = mmc_wait_for_cmd(card->host, &cmd, 0); if (err) { - printk(KERN_ERR "mmc_erase: group start error %d, " + pr_err("mmc_erase: group start error %d, " "status %#x\n", err, cmd.resp[0]); err = -EIO; goto out; @@ -1556,7 +1556,7 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from, cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_AC; err = mmc_wait_for_cmd(card->host, &cmd, 0); if (err) { - printk(KERN_ERR "mmc_erase: group end error %d, status %#x\n", + pr_err("mmc_erase: group end error %d, status %#x\n", err, cmd.resp[0]); err = -EIO; goto out; @@ -1569,7 +1569,7 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from, cmd.cmd_timeout_ms = mmc_erase_timeout(card, arg, qty); err = mmc_wait_for_cmd(card->host, &cmd, 0); if (err) { - printk(KERN_ERR "mmc_erase: erase error %d, status %#x\n", + pr_err("mmc_erase: erase error %d, status %#x\n", err, cmd.resp[0]); err = -EIO; goto out; @@ -1586,7 +1586,7 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from, /* Do not retry else we can't see errors */ err = mmc_wait_for_cmd(card->host, &cmd, 0); if (err || (cmd.resp[0] & 0xFDF92000)) { - printk(KERN_ERR "error %d requesting status %#x\n", + pr_err("error %d requesting status %#x\n", err, cmd.resp[0]); err = -EIO; goto out; @@ -2177,7 +2177,7 @@ int mmc_resume_host(struct mmc_host *host) BUG_ON(!host->bus_ops->resume); err = host->bus_ops->resume(host); if (err) { - printk(KERN_WARNING "%s: error %d during resume " + pr_warning("%s: error %d during resume " "(card was removed?)\n", mmc_hostname(host), err); err = 0; diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 7dde373d143..4e869d371a0 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -101,7 +101,7 @@ static int mmc_decode_cid(struct mmc_card *card) break; default: - printk(KERN_ERR "%s: card has unknown MMCA version %d\n", + pr_err("%s: card has unknown MMCA version %d\n", mmc_hostname(card->host), card->csd.mmca_vsn); return -EINVAL; } @@ -135,7 +135,7 @@ static int mmc_decode_csd(struct mmc_card *card) */ csd->structure = UNSTUFF_BITS(resp, 126, 2); if (csd->structure == 0) { - printk(KERN_ERR "%s: unrecognised CSD structure version %d\n", + pr_err("%s: unrecognised CSD structure version %d\n", mmc_hostname(card->host), csd->structure); return -EINVAL; } @@ -195,7 +195,7 @@ static int mmc_get_ext_csd(struct mmc_card *card, u8 **new_ext_csd) */ ext_csd = kmalloc(512, GFP_KERNEL); if (!ext_csd) { - printk(KERN_ERR "%s: could not allocate a buffer to " + pr_err("%s: could not allocate a buffer to " "receive the ext_csd.\n", mmc_hostname(card->host)); return -ENOMEM; } @@ -217,12 +217,12 @@ static int mmc_get_ext_csd(struct mmc_card *card, u8 **new_ext_csd) * stored in their CSD. */ if (card->csd.capacity == (4096 * 512)) { - printk(KERN_ERR "%s: unable to read EXT_CSD " + pr_err("%s: unable to read EXT_CSD " "on a possible high capacity card. " "Card will be ignored.\n", mmc_hostname(card->host)); } else { - printk(KERN_WARNING "%s: unable to read " + pr_warning("%s: unable to read " "EXT_CSD, performance might " "suffer.\n", mmc_hostname(card->host)); @@ -252,7 +252,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd) card->ext_csd.raw_ext_csd_structure = ext_csd[EXT_CSD_STRUCTURE]; if (card->csd.structure == 3) { if (card->ext_csd.raw_ext_csd_structure > 2) { - printk(KERN_ERR "%s: unrecognised EXT_CSD structure " + pr_err("%s: unrecognised EXT_CSD structure " "version %d\n", mmc_hostname(card->host), card->ext_csd.raw_ext_csd_structure); err = -EINVAL; @@ -262,7 +262,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd) card->ext_csd.rev = ext_csd[EXT_CSD_REV]; if (card->ext_csd.rev > 6) { - printk(KERN_ERR "%s: unrecognised EXT_CSD revision %d\n", + pr_err("%s: unrecognised EXT_CSD revision %d\n", mmc_hostname(card->host), card->ext_csd.rev); err = -EINVAL; goto out; @@ -308,7 +308,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd) break; default: /* MMC v4 spec says this cannot happen */ - printk(KERN_WARNING "%s: card is mmc v4 but doesn't " + pr_warning("%s: card is mmc v4 but doesn't " "support any high-speed modes.\n", mmc_hostname(card->host)); } @@ -857,7 +857,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, goto free_card; if (err) { - printk(KERN_WARNING "%s: switch to highspeed failed\n", + pr_warning("%s: switch to highspeed failed\n", mmc_hostname(card->host)); err = 0; } else { @@ -966,7 +966,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, card->ext_csd.generic_cmd6_time); } if (err) { - printk(KERN_WARNING "%s: switch to bus width %d ddr %d " + pr_warning("%s: switch to bus width %d ddr %d " "failed\n", mmc_hostname(card->host), 1 << bus_width, ddr); goto free_card; @@ -1204,7 +1204,7 @@ int mmc_attach_mmc(struct mmc_host *host) * support. */ if (ocr & 0x7F) { - printk(KERN_WARNING "%s: card claims to support voltages " + pr_warning("%s: card claims to support voltages " "below the defined range. These will be ignored.\n", mmc_hostname(host)); ocr &= ~0x7F; @@ -1243,7 +1243,7 @@ remove_card: err: mmc_detach_bus(host); - printk(KERN_ERR "%s: error %d whilst initialising MMC card\n", + pr_err("%s: error %d whilst initialising MMC card\n", mmc_hostname(host), err); return err; diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c index 7aa13d01a83..4e11d56b3f7 100644 --- a/drivers/mmc/core/mmc_ops.c +++ b/drivers/mmc/core/mmc_ops.c @@ -414,7 +414,7 @@ int mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value, return -EBADMSG; } else { if (status & 0xFDFFA000) - printk(KERN_WARNING "%s: unexpected status %#x after " + pr_warning("%s: unexpected status %#x after " "switch", mmc_hostname(card->host), status); if (status & R1_SWITCH_ERROR) return -EBADMSG; @@ -476,7 +476,7 @@ mmc_send_bus_test(struct mmc_card *card, struct mmc_host *host, u8 opcode, else if (len == 4) test_buf = testdata_4bit; else { - printk(KERN_ERR "%s: Invalid bus_width %d\n", + pr_err("%s: Invalid bus_width %d\n", mmc_hostname(host), len); kfree(data_buf); return -EINVAL; diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 342b18c4afc..25b93729413 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -163,7 +163,7 @@ static int mmc_decode_csd(struct mmc_card *card) csd->erase_size = 1; break; default: - printk(KERN_ERR "%s: unrecognised CSD structure version %d\n", + pr_err("%s: unrecognised CSD structure version %d\n", mmc_hostname(card->host), csd_struct); return -EINVAL; } @@ -187,7 +187,7 @@ static int mmc_decode_scr(struct mmc_card *card) scr_struct = UNSTUFF_BITS(resp, 60, 4); if (scr_struct != 0) { - printk(KERN_ERR "%s: unrecognised SCR structure version %d\n", + pr_err("%s: unrecognised SCR structure version %d\n", mmc_hostname(card->host), scr_struct); return -EINVAL; } @@ -218,7 +218,7 @@ static int mmc_read_ssr(struct mmc_card *card) u32 *ssr; if (!(card->csd.cmdclass & CCC_APP_SPEC)) { - printk(KERN_WARNING "%s: card lacks mandatory SD Status " + pr_warning("%s: card lacks mandatory SD Status " "function.\n", mmc_hostname(card->host)); return 0; } @@ -229,7 +229,7 @@ static int mmc_read_ssr(struct mmc_card *card) err = mmc_app_sd_status(card, ssr); if (err) { - printk(KERN_WARNING "%s: problem reading SD Status " + pr_warning("%s: problem reading SD Status " "register.\n", mmc_hostname(card->host)); err = 0; goto out; @@ -253,7 +253,7 @@ static int mmc_read_ssr(struct mmc_card *card) card->ssr.erase_offset = eo * 1000; } } else { - printk(KERN_WARNING "%s: SD Status: Invalid Allocation Unit " + pr_warning("%s: SD Status: Invalid Allocation Unit " "size.\n", mmc_hostname(card->host)); } out: @@ -273,7 +273,7 @@ static int mmc_read_switch(struct mmc_card *card) return 0; if (!(card->csd.cmdclass & CCC_SWITCH)) { - printk(KERN_WARNING "%s: card lacks mandatory switch " + pr_warning("%s: card lacks mandatory switch " "function, performance might suffer.\n", mmc_hostname(card->host)); return 0; @@ -283,7 +283,7 @@ static int mmc_read_switch(struct mmc_card *card) status = kmalloc(64, GFP_KERNEL); if (!status) { - printk(KERN_ERR "%s: could not allocate a buffer for " + pr_err("%s: could not allocate a buffer for " "switch capabilities.\n", mmc_hostname(card->host)); return -ENOMEM; @@ -299,7 +299,7 @@ static int mmc_read_switch(struct mmc_card *card) if (err != -EINVAL && err != -ENOSYS && err != -EFAULT) goto out; - printk(KERN_WARNING "%s: problem reading Bus Speed modes.\n", + pr_warning("%s: problem reading Bus Speed modes.\n", mmc_hostname(card->host)); err = 0; @@ -319,7 +319,7 @@ static int mmc_read_switch(struct mmc_card *card) if (err != -EINVAL && err != -ENOSYS && err != -EFAULT) goto out; - printk(KERN_WARNING "%s: problem reading " + pr_warning("%s: problem reading " "Driver Strength.\n", mmc_hostname(card->host)); err = 0; @@ -339,7 +339,7 @@ static int mmc_read_switch(struct mmc_card *card) if (err != -EINVAL && err != -ENOSYS && err != -EFAULT) goto out; - printk(KERN_WARNING "%s: problem reading " + pr_warning("%s: problem reading " "Current Limit.\n", mmc_hostname(card->host)); err = 0; @@ -383,7 +383,7 @@ int mmc_sd_switch_hs(struct mmc_card *card) status = kmalloc(64, GFP_KERNEL); if (!status) { - printk(KERN_ERR "%s: could not allocate a buffer for " + pr_err("%s: could not allocate a buffer for " "switch capabilities.\n", mmc_hostname(card->host)); return -ENOMEM; } @@ -393,7 +393,7 @@ int mmc_sd_switch_hs(struct mmc_card *card) goto out; if ((status[16] & 0xF) != 1) { - printk(KERN_WARNING "%s: Problem switching card " + pr_warning("%s: Problem switching card " "into high-speed mode!\n", mmc_hostname(card->host)); err = 0; @@ -459,7 +459,7 @@ static int sd_select_driver_type(struct mmc_card *card, u8 *status) return err; if ((status[15] & 0xF) != drive_strength) { - printk(KERN_WARNING "%s: Problem setting drive strength!\n", + pr_warning("%s: Problem setting drive strength!\n", mmc_hostname(card->host)); return 0; } @@ -538,7 +538,7 @@ static int sd_set_bus_speed_mode(struct mmc_card *card, u8 *status) return err; if ((status[16] & 0xF) != card->sd_bus_speed) - printk(KERN_WARNING "%s: Problem setting bus speed mode!\n", + pr_warning("%s: Problem setting bus speed mode!\n", mmc_hostname(card->host)); else { mmc_set_timing(card->host, timing); @@ -600,7 +600,7 @@ static int sd_set_current_limit(struct mmc_card *card, u8 *status) return err; if (((status[15] >> 4) & 0x0F) != current_limit) - printk(KERN_WARNING "%s: Problem setting current limit!\n", + pr_warning("%s: Problem setting current limit!\n", mmc_hostname(card->host)); return 0; @@ -622,7 +622,7 @@ static int mmc_sd_init_uhs_card(struct mmc_card *card) status = kmalloc(64, GFP_KERNEL); if (!status) { - printk(KERN_ERR "%s: could not allocate a buffer for " + pr_err("%s: could not allocate a buffer for " "switch capabilities.\n", mmc_hostname(card->host)); return -ENOMEM; } @@ -852,7 +852,7 @@ int mmc_sd_setup_card(struct mmc_host *host, struct mmc_card *card, ro = host->ops->get_ro(host); if (ro < 0) { - printk(KERN_WARNING "%s: host does not " + pr_warning("%s: host does not " "support reading read-only " "switch. assuming write-enable.\n", mmc_hostname(host)); @@ -1166,7 +1166,7 @@ int mmc_attach_sd(struct mmc_host *host) * support. */ if (ocr & 0x7F) { - printk(KERN_WARNING "%s: card claims to support voltages " + pr_warning("%s: card claims to support voltages " "below the defined range. These will be ignored.\n", mmc_hostname(host)); ocr &= ~0x7F; @@ -1174,7 +1174,7 @@ int mmc_attach_sd(struct mmc_host *host) if ((ocr & MMC_VDD_165_195) && !(host->ocr_avail_sd & MMC_VDD_165_195)) { - printk(KERN_WARNING "%s: SD card claims to support the " + pr_warning("%s: SD card claims to support the " "incompletely defined 'low voltage range'. This " "will be ignored.\n", mmc_hostname(host)); ocr &= ~MMC_VDD_165_195; @@ -1213,7 +1213,7 @@ remove_card: err: mmc_detach_bus(host); - printk(KERN_ERR "%s: error %d whilst initialising SD card\n", + pr_err("%s: error %d whilst initialising SD card\n", mmc_hostname(host), err); return err; diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 698d813cff3..925bab052b0 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -112,7 +112,7 @@ static int sdio_read_cccr(struct mmc_card *card) cccr_vsn = data & 0x0f; if (cccr_vsn > SDIO_CCCR_REV_1_20) { - printk(KERN_ERR "%s: unrecognised CCCR structure version %d\n", + pr_err("%s: unrecognised CCCR structure version %d\n", mmc_hostname(card->host), cccr_vsn); return -EINVAL; } @@ -777,7 +777,7 @@ int mmc_attach_sdio(struct mmc_host *host) * support. */ if (ocr & 0x7F) { - printk(KERN_WARNING "%s: card claims to support voltages " + pr_warning("%s: card claims to support voltages " "below the defined range. These will be ignored.\n", mmc_hostname(host)); ocr &= ~0x7F; @@ -874,7 +874,7 @@ remove: err: mmc_detach_bus(host); - printk(KERN_ERR "%s: error %d whilst initialising SDIO card\n", + pr_err("%s: error %d whilst initialising SDIO card\n", mmc_hostname(host), err); return err; diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c index e4e6822d09e..c643b2f78bf 100644 --- a/drivers/mmc/core/sdio_bus.c +++ b/drivers/mmc/core/sdio_bus.c @@ -173,7 +173,7 @@ static int sdio_bus_remove(struct device *dev) drv->remove(func); if (func->irq_handler) { - printk(KERN_WARNING "WARNING: driver %s did not remove " + pr_warning("WARNING: driver %s did not remove " "its interrupt handler!\n", drv->name); sdio_claim_host(func); sdio_release_irq(func); diff --git a/drivers/mmc/core/sdio_cis.c b/drivers/mmc/core/sdio_cis.c index 541bdb89e0c..f1c7ed8f4d8 100644 --- a/drivers/mmc/core/sdio_cis.c +++ b/drivers/mmc/core/sdio_cis.c @@ -132,7 +132,7 @@ static int cis_tpl_parse(struct mmc_card *card, struct sdio_func *func, ret = -EINVAL; } if (ret && ret != -EILSEQ && ret != -ENOENT) { - printk(KERN_ERR "%s: bad %s tuple 0x%02x (%u bytes)\n", + pr_err("%s: bad %s tuple 0x%02x (%u bytes)\n", mmc_hostname(card->host), tpl_descr, code, size); } } else { @@ -313,7 +313,7 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func) if (ret == -ENOENT) { /* warn about unknown tuples */ - printk(KERN_WARNING "%s: queuing unknown" + pr_warning("%s: queuing unknown" " CIS tuple 0x%02x (%u bytes)\n", mmc_hostname(card->host), tpl_code, tpl_link); diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c index 03ead028d2c..b644dd59c16 100644 --- a/drivers/mmc/core/sdio_irq.c +++ b/drivers/mmc/core/sdio_irq.c @@ -45,7 +45,7 @@ static int process_sdio_pending_irqs(struct mmc_card *card) ret = mmc_io_rw_direct(card, 0, 0, SDIO_CCCR_INTx, 0, &pending); if (ret) { - printk(KERN_DEBUG "%s: error %d reading SDIO_CCCR_INTx\n", + pr_debug("%s: error %d reading SDIO_CCCR_INTx\n", mmc_card_id(card), ret); return ret; } @@ -55,7 +55,7 @@ static int process_sdio_pending_irqs(struct mmc_card *card) if (pending & (1 << i)) { func = card->sdio_func[i - 1]; if (!func) { - printk(KERN_WARNING "%s: pending IRQ for " + pr_warning("%s: pending IRQ for " "non-existent function\n", mmc_card_id(card)); ret = -EINVAL; @@ -63,7 +63,7 @@ static int process_sdio_pending_irqs(struct mmc_card *card) func->irq_handler(func); count++; } else { - printk(KERN_WARNING "%s: pending IRQ with no handler\n", + pr_warning("%s: pending IRQ with no handler\n", sdio_func_id(func)); ret = -EINVAL; } diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c index ef72e874ca3..707bc7dddd2 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c @@ -55,7 +55,7 @@ #ifdef DEBUG #define DBG(fmt, idx, args...) \ - printk(KERN_DEBUG "au1xmmc(%d): DEBUG: " fmt, idx, ##args) + pr_debug("au1xmmc(%d): DEBUG: " fmt, idx, ##args) #else #define DBG(fmt, idx, args...) do {} while (0) #endif @@ -268,7 +268,7 @@ static int au1xmmc_send_command(struct au1xmmc_host *host, int wait, mmccmd |= SD_CMD_RT_3; break; default: - printk(KERN_INFO "au1xmmc: unhandled response type %02x\n", + pr_info("au1xmmc: unhandled response type %02x\n", mmc_resp_type(cmd)); retu |