Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3c76eb9 authored by Girish K S's avatar Girish K S Committed by Chris Ball
Browse files

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: default avatarGirish K S <girish.shivananjappa@linaro.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent b23cf0bd
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -937,7 +937,7 @@ static int mmc_blk_err_check(struct mmc_card *card,
		do {
		do {
			int err = get_card_status(card, &status, 5);
			int err = get_card_status(card, &status, 5);
			if (err) {
			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);
				       req->rq_disk->disk_name, err);
				return MMC_BLK_CMD_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.
			 * were returned by the host controller, it's a bug.
			 */
			 */
			if (status == MMC_BLK_SUCCESS && ret) {
			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),
				       __func__, blk_rq_bytes(req),
				       brq->data.bytes_xfered);
				       brq->data.bytes_xfered);
				rqc = NULL;
				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,
	string_get_size((u64)get_capacity(part_md->disk) << 9, STRING_UNITS_2,
			cap_str, sizeof(cap_str));
			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),
	       part_md->disk->disk_name, mmc_card_id(card),
	       mmc_card_name(card), part_md->part_type, cap_str);
	       mmc_card_name(card), part_md->part_type, cap_str);
	return 0;
	return 0;
@@ -1511,7 +1511,7 @@ mmc_blk_set_blksize(struct mmc_blk_data *md, struct mmc_card *card)
	mmc_release_host(card->host);
	mmc_release_host(card->host);


	if (err) {
	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);
			md->disk->disk_name, err);
		return -EINVAL;
		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,
	string_get_size((u64)get_capacity(md->disk) << 9, STRING_UNITS_2,
			cap_str, sizeof(cap_str));
			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),
		md->disk->disk_name, mmc_card_id(card), mmc_card_name(card),
		cap_str, md->read_only ? "(ro)" : "");
		cap_str, md->read_only ? "(ro)" : "");


+17 −17
Original line number Original line Diff line number Diff line
@@ -251,7 +251,7 @@ static int mmc_test_wait_busy(struct mmc_test_card *test)
		if (!busy && mmc_test_busy(&cmd)) {
		if (!busy && mmc_test_busy(&cmd)) {
			busy = 1;
			busy = 1;
			if (test->card->host->caps & MMC_CAP_WAIT_WHILE_BUSY)
			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",
					"wait for busy state to end.\n",
					mmc_hostname(test->card->host));
					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);
	rate = mmc_test_rate(bytes, &ts);
	iops = mmc_test_rate(100, &ts); /* I/O ops per sec x 100 */
	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",
			 "seconds (%u kB/s, %u KiB/s, %u.%02u IOPS)\n",
			 mmc_hostname(test->card->host), sectors, sectors >> 1,
			 mmc_hostname(test->card->host), sectors, sectors >> 1,
			 (sectors & 1 ? ".5" : ""), (unsigned long)ts.tv_sec,
			 (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);
	rate = mmc_test_rate(tot, &ts);
	iops = mmc_test_rate(count * 100, &ts); /* I/O ops per sec x 100 */
	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, "
			 "%lu.%09lu seconds (%u kB/s, %u KiB/s, "
			 "%u.%02u IOPS, sg_len %d)\n",
			 "%u.%02u IOPS, sg_len %d)\n",
			 mmc_hostname(test->card->host), count, sectors, count,
			 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)
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));
	       mmc_hostname(test->card->host));
	return 0;
	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);
				      t->max_seg_sz, &t->sg_len, min_sg_len);
	}
	}
	if (err)
	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));
		       mmc_hostname(test->card->host));
	return err;
	return err;
}
}
@@ -2136,7 +2136,7 @@ static int mmc_test_rw_multiple(struct mmc_test_card *test,


	return ret;
	return ret;
 err:
 err:
	printk(KERN_INFO "[%s] error\n", __func__);
	pr_info("[%s] error\n", __func__);
	return ret;
	return ret;
}
}


@@ -2150,7 +2150,7 @@ static int mmc_test_rw_multiple_size(struct mmc_test_card *test,


	if (rw->do_nonblock_req &&
	if (rw->do_nonblock_req &&
	    ((!pre_req && post_req) || (pre_req && !post_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;
		return -EINVAL;
	}
	}


@@ -2691,7 +2691,7 @@ static void mmc_test_run(struct mmc_test_card *test, int testcase)
{
{
	int i, ret;
	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_hostname(test->card->host), mmc_card_id(test->card));


	mmc_claim_host(test->card->host);
	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))
		if (testcase && ((i + 1) != testcase))
			continue;
			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_hostname(test->card->host), i + 1,
			mmc_test_cases[i].name);
			mmc_test_cases[i].name);


		if (mmc_test_cases[i].prepare) {
		if (mmc_test_cases[i].prepare) {
			ret = mmc_test_cases[i].prepare(test);
			ret = mmc_test_cases[i].prepare(test);
			if (ret) {
			if (ret) {
				printk(KERN_INFO "%s: Result: Prepare "
				pr_info("%s: Result: Prepare "
					"stage failed! (%d)\n",
					"stage failed! (%d)\n",
					mmc_hostname(test->card->host),
					mmc_hostname(test->card->host),
					ret);
					ret);
@@ -2739,25 +2739,25 @@ static void mmc_test_run(struct mmc_test_card *test, int testcase)
		ret = mmc_test_cases[i].run(test);
		ret = mmc_test_cases[i].run(test);
		switch (ret) {
		switch (ret) {
		case RESULT_OK:
		case RESULT_OK:
			printk(KERN_INFO "%s: Result: OK\n",
			pr_info("%s: Result: OK\n",
				mmc_hostname(test->card->host));
				mmc_hostname(test->card->host));
			break;
			break;
		case RESULT_FAIL:
		case RESULT_FAIL:
			printk(KERN_INFO "%s: Result: FAILED\n",
			pr_info("%s: Result: FAILED\n",
				mmc_hostname(test->card->host));
				mmc_hostname(test->card->host));
			break;
			break;
		case RESULT_UNSUP_HOST:
		case RESULT_UNSUP_HOST:
			printk(KERN_INFO "%s: Result: UNSUPPORTED "
			pr_info("%s: Result: UNSUPPORTED "
				"(by host)\n",
				"(by host)\n",
				mmc_hostname(test->card->host));
				mmc_hostname(test->card->host));
			break;
			break;
		case RESULT_UNSUP_CARD:
		case RESULT_UNSUP_CARD:
			printk(KERN_INFO "%s: Result: UNSUPPORTED "
			pr_info("%s: Result: UNSUPPORTED "
				"(by card)\n",
				"(by card)\n",
				mmc_hostname(test->card->host));
				mmc_hostname(test->card->host));
			break;
			break;
		default:
		default:
			printk(KERN_INFO "%s: Result: ERROR (%d)\n",
			pr_info("%s: Result: ERROR (%d)\n",
				mmc_hostname(test->card->host), ret);
				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) {
		if (mmc_test_cases[i].cleanup) {
			ret = mmc_test_cases[i].cleanup(test);
			ret = mmc_test_cases[i].cleanup(test);
			if (ret) {
			if (ret) {
				printk(KERN_INFO "%s: Warning: Cleanup "
				pr_info("%s: Warning: Cleanup "
					"stage failed! (%d)\n",
					"stage failed! (%d)\n",
					mmc_hostname(test->card->host),
					mmc_hostname(test->card->host),
					ret);
					ret);
@@ -2778,7 +2778,7 @@ static void mmc_test_run(struct mmc_test_card *test, int testcase)


	mmc_release_host(test->card->host);
	mmc_release_host(test->card->host);


	printk(KERN_INFO "%s: Tests completed.\n",
	pr_info("%s: Tests completed.\n",
		mmc_hostname(test->card->host));
		mmc_hostname(test->card->host));
}
}


+2 −2
Original line number Original line Diff line number Diff line
@@ -197,13 +197,13 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card,
		if (bouncesz > 512) {
		if (bouncesz > 512) {
			mqrq_cur->bounce_buf = kmalloc(bouncesz, GFP_KERNEL);
			mqrq_cur->bounce_buf = kmalloc(bouncesz, GFP_KERNEL);
			if (!mqrq_cur->bounce_buf) {
			if (!mqrq_cur->bounce_buf) {
				printk(KERN_WARNING "%s: unable to "
				pr_warning("%s: unable to "
					"allocate bounce cur buffer\n",
					"allocate bounce cur buffer\n",
					mmc_card_name(card));
					mmc_card_name(card));
			}
			}
			mqrq_prev->bounce_buf = kmalloc(bouncesz, GFP_KERNEL);
			mqrq_prev->bounce_buf = kmalloc(bouncesz, GFP_KERNEL);
			if (!mqrq_prev->bounce_buf) {
			if (!mqrq_prev->bounce_buf) {
				printk(KERN_WARNING "%s: unable to "
				pr_warning("%s: unable to "
					"allocate bounce prev buffer\n",
					"allocate bounce prev buffer\n",
					mmc_card_name(card));
					mmc_card_name(card));
				kfree(mqrq_cur->bounce_buf);
				kfree(mqrq_cur->bounce_buf);
+5 −5
Original line number Original line Diff line number Diff line
@@ -1082,7 +1082,7 @@ static int sdio_uart_probe(struct sdio_func *func,
		return -ENOMEM;
		return -ENOMEM;


	if (func->class == SDIO_CLASS_UART) {
	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));
		       sdio_func_id(func));
		kfree(port);
		kfree(port);
		return -ENOSYS;
		return -ENOSYS;
@@ -1101,23 +1101,23 @@ static int sdio_uart_probe(struct sdio_func *func,
				break;
				break;
		}
		}
		if (!tpl) {
		if (!tpl) {
			printk(KERN_WARNING
			pr_warning(
       "%s: can't find tuple 0x91 subtuple 0 (SUBTPL_SIOREG) for GPS class\n",
       "%s: can't find tuple 0x91 subtuple 0 (SUBTPL_SIOREG) for GPS class\n",
			       sdio_func_id(func));
			       sdio_func_id(func));
			kfree(port);
			kfree(port);
			return -EINVAL;
			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]);
		       sdio_func_id(func), tpl->data[2], tpl->data[3]);
		port->regs_offset = (tpl->data[4] << 0) |
		port->regs_offset = (tpl->data[4] << 0) |
				    (tpl->data[5] << 8) |
				    (tpl->data[5] << 8) |
				    (tpl->data[6] << 16);
				    (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);
		       sdio_func_id(func), port->regs_offset);
		port->uartclk = tpl->data[7] * 115200;
		port->uartclk = tpl->data[7] * 115200;
		if (port->uartclk == 0)
		if (port->uartclk == 0)
			port->uartclk = 115200;
			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,
		       sdio_func_id(func), port->uartclk,
		       tpl->data[7], tpl->data[8] | (tpl->data[9] << 8));
		       tpl->data[7], tpl->data[8] | (tpl->data[9] << 8));
	} else {
	} else {
+3 −3
Original line number Original line Diff line number Diff line
@@ -295,7 +295,7 @@ int mmc_add_card(struct mmc_card *card)
	}
	}


	if (mmc_host_is_spi(card->host)) {
	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_hostname(card->host),
			mmc_card_highspeed(card) ? "high speed " : "",
			mmc_card_highspeed(card) ? "high speed " : "",
			mmc_card_ddr_mode(card) ? "DDR " : "",
			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_card_present(card)) {
		if (mmc_host_is_spi(card->host)) {
		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));
				mmc_hostname(card->host));
		} else {
		} else {
			printk(KERN_INFO "%s: card %04x removed\n",
			pr_info("%s: card %04x removed\n",
				mmc_hostname(card->host), card->rca);
				mmc_hostname(card->host), card->rca);
		}
		}
		device_del(&card->dev);
		device_del(&card->dev);
Loading