From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/3] mci: turn several pr_* statements into debug
Date: Tue, 12 Apr 2011 10:17:51 +0200 [thread overview]
Message-ID: <1302596272-21635-3-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1302596272-21635-1-git-send-email-s.hauer@pengutronix.de>
These are mostly useful for developers, so turn them off by default.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/mci/mci-core.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index a51c44b..c4c5c2f 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -684,7 +684,7 @@ static void mci_extract_max_tran_speed_from_csd(struct device_d *mci_dev)
unit = tran_speed_unit[(mci->csd[0] & 0x7)];
time = tran_speed_time[((mci->csd[0] >> 3) & 0xf)];
if ((unit == 0) || (time == 0)) {
- pr_warning("Unsupported 'TRAN_SPEED' unit/time value."
+ pr_debug("Unsupported 'TRAN_SPEED' unit/time value."
" Can't calculate card's max. transfer speed\n");
return;
}
@@ -802,13 +802,13 @@ static int mci_startup(struct device_d *mci_dev)
/* sanitiy? */
if (mci->read_bl_len > 512) {
mci->read_bl_len = 512;
- pr_warning("Limiting max. read block size down to %u\n",
+ pr_debug("Limiting max. read block size down to %u\n",
mci->read_bl_len);
}
if (mci->write_bl_len > 512) {
mci->write_bl_len = 512;
- pr_warning("Limiting max. write block size down to %u\n",
+ pr_debug("Limiting max. write block size down to %u\n",
mci->read_bl_len);
}
pr_debug("Read block length: %u, Write block length: %u\n",
@@ -961,7 +961,7 @@ static int mci_sd_write(struct device_d *disk_dev, uint64_t sector_start,
__func__, sector_count, (unsigned)sector_start);
if (mci->write_bl_len != 512) {
- pr_warning("MMC/SD block size is not 512 bytes (its %u bytes instead)\n",
+ pr_debug("MMC/SD block size is not 512 bytes (its %u bytes instead)\n",
mci->read_bl_len);
return -EINVAL;
}
@@ -969,13 +969,13 @@ static int mci_sd_write(struct device_d *disk_dev, uint64_t sector_start,
while (sector_count) {
/* size of the block number field in the MMC/SD command is 32 bit only */
if (sector_start > MAX_BUFFER_NUMBER) {
- pr_err("Cannot handle block number %llu. Too large!\n",
+ pr_debug("Cannot handle block number %llu. Too large!\n",
sector_start);
return -EINVAL;
}
rc = mci_block_write(mci_dev, buffer, sector_start);
if (rc != 0) {
- pr_err("Writing block %u failed with %d\n", (unsigned)sector_start, rc);
+ pr_debug("Writing block %u failed with %d\n", (unsigned)sector_start, rc);
return rc;
}
sector_count--;
@@ -1009,7 +1009,7 @@ static int mci_sd_read(struct device_d *disk_dev, uint64_t sector_start,
__func__, sector_count, (unsigned)sector_start);
if (mci->read_bl_len != 512) {
- pr_warning("MMC/SD block size is not 512 bytes (its %u bytes instead)\n",
+ pr_debug("MMC/SD block size is not 512 bytes (its %u bytes instead)\n",
mci->read_bl_len);
return -EINVAL;
}
@@ -1023,7 +1023,7 @@ static int mci_sd_read(struct device_d *disk_dev, uint64_t sector_start,
}
rc = mci_read_block(mci_dev, buffer, (unsigned)sector_start, now);
if (rc != 0) {
- pr_err("Reading block %u failed with %d\n", (unsigned)sector_start, rc);
+ pr_debug("Reading block %u failed with %d\n", (unsigned)sector_start, rc);
return rc;
}
sector_count -= now;
@@ -1182,7 +1182,7 @@ static int mci_card_probe(struct device_d *mci_dev)
/* start with a host interface reset */
rc = (host->init)(host, mci_dev);
if (rc) {
- pr_err("Cannot reset the SD/MMC interface\n");
+ pr_debug("Cannot reset the SD/MMC interface\n");
return rc;
}
@@ -1192,7 +1192,7 @@ static int mci_card_probe(struct device_d *mci_dev)
/* reset the card */
rc = mci_go_idle(mci_dev);
if (rc) {
- pr_warning("Cannot reset the SD/MMC card\n");
+ pr_debug("Cannot reset the SD/MMC card\n");
goto on_error;
}
@@ -1210,7 +1210,7 @@ static int mci_card_probe(struct device_d *mci_dev)
rc = mci_startup(mci_dev);
if (rc) {
- printf("Card's startup fails with %d\n", rc);
+ pr_debug("Card's startup fails with %d\n", rc);
goto on_error;
}
@@ -1321,7 +1321,7 @@ static int mci_probe(struct device_d *mci_dev)
*/
rc = add_mci_parameter(mci_dev);
if (rc != 0) {
- pr_err("Failed to add 'probe' parameter to the MCI device\n");
+ pr_debug("Failed to add 'probe' parameter to the MCI device\n");
goto on_error;
}
}
@@ -1331,7 +1331,7 @@ static int mci_probe(struct device_d *mci_dev)
/* add params on demand */
rc = add_mci_parameter(mci_dev);
if (rc != 0) {
- pr_err("Failed to add 'probe' parameter to the MCI device\n");
+ pr_debug("Failed to add 'probe' parameter to the MCI device\n");
goto on_error;
}
#endif
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-04-12 8:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-12 8:17 mci patches Sascha Hauer
2011-04-12 8:17 ` [PATCH 1/3] mci: shrink string footprint Sascha Hauer
2011-04-12 8:17 ` Sascha Hauer [this message]
2011-04-12 8:57 ` [PATCH 2/3] mci: turn several pr_* statements into debug Juergen Beisert
2011-04-12 9:16 ` Sascha Hauer
2011-04-12 8:17 ` [PATCH 3/3] ata: guessing disk sizes is only needed on X86 Sascha Hauer
2011-04-12 9:05 ` Juergen Beisert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1302596272-21635-3-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox