Skip to contentSkip to conversation

mmc_rescan: reduce verbosity

PATCH Superseded Eric Bénard 5 participants 9 messages Oct 11, 2010 – Oct 12, 2010 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc_rescan: reduce verbosity

since commit 820f2bcfdc32cd90061224c930cf670f961e12d1 mmc_rescan includes a pr_info which prints 4 lines each second for hosts configured with MMC_CAP_NEEDS_POLL. Tested on i.MX51's sdhci-esdhc. This patch increase log level to debug (but maybe the right solution would be to remove this log).

---
 drivers/mmc/core/core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/core/core.c +1 -1
index c94565d..6ecfcd9 100644
@@ -1482,7 +1482,7 @@ void mmc_rescan(struct work_struct *work)
 			mmc_release_host(host);
 			goto out;
 		}
-		pr_info("%s: %s: trying to init card at %u Hz\n",
+		pr_debug("%s: %s: trying to init card at %u Hz\n",
 			mmc_hostname(host), __func__, host->f_init);
 
 		mmc_power_up(host);
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 5 lines · Eric Bénard

since commit 820f2bcfdc32cd90061224c930cf670f961e12d1 mmc_rescan includes a pr_info which prints 4 lines each second for hosts configured with MMC_CAP_NEEDS_POLL. Tested on i.MX51's sdhci-esdhc. This patch increase log level to debug (but maybe the right solution would be to remove this log).

Indeed. Flooding the log with debug messages is not much better.

Nicolas

#2 lore raw

Hi,

Quoted 8 lines · Nicolas Pitre
Quoted 5 lines · Eric Bénard

since commit 820f2bcfdc32cd90061224c930cf670f961e12d1 mmc_rescan includes a pr_info which prints 4 lines each second for hosts configured with MMC_CAP_NEEDS_POLL. Tested on i.MX51's sdhci-esdhc. This patch increase log level to debug (but maybe the right solution would be to remove this log).

Indeed. Flooding the log with debug messages is not much better.

Other options include:

(a) Turn the message into a DBG(). (CONFIG_MMC_DEBUG=y)
(b) Turn the message into a DBG(), predicated on !MMC_CAP_NEEDS_POLL.
(c) Remove the message.

Any thoughts? I'll go with (c) unless we agree on a better idea.

Thanks,

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
#3 lore raw
Quoted 12 lines · Chris Ball

Hi,

Quoted 8 lines · Nicolas Pitre
Quoted 5 lines · Eric Bénard

since commit 820f2bcfdc32cd90061224c930cf670f961e12d1 mmc_rescan includes a pr_info which prints 4 lines each second for hosts configured with MMC_CAP_NEEDS_POLL. Tested on i.MX51's sdhci-esdhc. This patch increase log level to debug (but maybe the right solution would be to remove this log).

Indeed. Flooding the log with debug messages is not much better.

Quoted 7 lines

Other options include:

(a) Turn the message into a DBG(). (CONFIG_MMC_DEBUG=y)
(b) Turn the message into a DBG(), predicated on !MMC_CAP_NEEDS_POLL.
(c) Remove the message.

Any thoughts? I'll go with (c) unless we agree on a better idea.

My preference would be (a). You don't lose the intended debugging aid but it has to be turned on explicitly. The people who might care most probably have CONFIG_MMC_DEBUG=y already.

Nicolas

#4 lore raw
Quoted 20 lines · Nicolas Pitre
Quoted 18 lines · Chris Ball

Hi,

Quoted 8 lines · Nicolas Pitre
Quoted 5 lines · Eric Bénard

since commit 820f2bcfdc32cd90061224c930cf670f961e12d1 mmc_rescan includes a pr_info which prints 4 lines each second for hosts configured with MMC_CAP_NEEDS_POLL. Tested on i.MX51's sdhci-esdhc. This patch increase log level to debug (but maybe the right solution would be to remove this log).

Indeed. Flooding the log with debug messages is not much better.

Other options include:

(a) Turn the message into a DBG(). (CONFIG_MMC_DEBUG=y)
(b) Turn the message into a DBG(), predicated on !MMC_CAP_NEEDS_POLL.
(c) Remove the message.

Quoted 5 lines
Quoted 1 line

Any thoughts? I'll go with (c) unless we agree on a better idea.

My preference would be (a). You don't lose the intended debugging aid but it has to be turned on explicitly. The people who might care most probably have CONFIG_MMC_DEBUG=y already.

+1 There has been a lot of discussion/issues about the initialization frequency, so this output might be desired in special situations.

Signature · 2 lines
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#5 lore raw

PATCH v2 1/1 mmc_rescan: reduce verbosity

since commit 820f2bcfdc32cd90061224c930cf670f961e12d1 mmc_rescan includes a pr_info which prints 4 lines each second for hosts configured with MMC_CAP_NEEDS_POLL. Tested on i.MX51's sdhci-esdhc. This patch enable the log only if CONFIG_MMC_DEBUG is selected.

---
v2 : enable log only if CONFIG_MMC_DEBUG is selected v1 : use pr_debug instead of pr_info

 drivers/mmc/core/core.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/mmc/core/core.c +2 -1
index c94565d..cda9d29 100644
@@ -1482,9 +1482,10 @@ void mmc_rescan(struct work_struct *work)
 			mmc_release_host(host);
 			goto out;
 		}
+#ifdef CONFIG_MMC_DEBUG
 		pr_info("%s: %s: trying to init card at %u Hz\n",
 			mmc_hostname(host), __func__, host->f_init);
-
+#endif
 		mmc_power_up(host);
 		sdio_reset(host);
 		mmc_go_idle(host);
Signature · 1 line
1.7.0.4
Acked-by on v2 1/1
#6 lore raw
Quoted 6 lines · Eric Bénard

since commit 820f2bcfdc32cd90061224c930cf670f961e12d1 mmc_rescan includes a pr_info which prints 4 lines each second for hosts configured with MMC_CAP_NEEDS_POLL. Tested on i.MX51's sdhci-esdhc. This patch enable the log only if CONFIG_MMC_DEBUG is selected.

Signature · 2 lines
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Applied
#7 lore raw
In reply to Eric Bénard

Hi Eric,

Quoted 19 lines · Eric Bénard

since commit 820f2bcfdc32cd90061224c930cf670f961e12d1 mmc_rescan includes a pr_info which prints 4 lines each second for hosts configured with MMC_CAP_NEEDS_POLL. Tested on i.MX51's sdhci-esdhc. This patch enable the log only if CONFIG_MMC_DEBUG is selected.

---
v2 : enable log only if CONFIG_MMC_DEBUG is selected v1 : use pr_debug instead of pr_info

 drivers/mmc/core/core.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/mmc/core/core.c +0 -0
index c94565d..cda9d29 100644
@@ -1482,9 +1482,10 @@ void mmc_rescan(struct work_struct *work)
 			mmc_release_host(host);

drivers/mmc/core/core.c void mmc_rescan(struct work_struct *work) · line 1491

Quoted 10 lines
drivers/mmc/core/core.c +2 -1
 			goto out;
 		}
+#ifdef CONFIG_MMC_DEBUG
 		pr_info("%s: %s: trying to init card at %u Hz\n",
 			mmc_hostname(host), __func__, host->f_init);
-
+#endif
 		mmc_power_up(host);
 		sdio_reset(host);
 		mmc_go_idle(host);

Thanks, applied to mmc-next.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
Acked-by
#8 lore raw
Quoted 15 lines · Chris Ball

Hi Eric,

Quoted 12 lines · Eric Bénard

since commit 820f2bcfdc32cd90061224c930cf670f961e12d1 mmc_rescan includes a pr_info which prints 4 lines each second for hosts configured with MMC_CAP_NEEDS_POLL. Tested on i.MX51's sdhci-esdhc. This patch enable the log only if CONFIG_MMC_DEBUG is selected.

---
v2 : enable log only if CONFIG_MMC_DEBUG is selected v1 : use pr_debug instead of pr_info

 drivers/mmc/core/core.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Quoted 13 lines

drivers/mmc/core/core.c void mmc_rescan(struct work_struct *work) · line 1488

Quoted 13 lines
drivers/mmc/core/core.c +2 -1
index c94565d..cda9d29 100644
@@ -1482,9 +1482,10 @@ void mmc_rescan(struct work_struct *work)
 			mmc_release_host(host);
 			goto out;
 		}
+#ifdef CONFIG_MMC_DEBUG
 		pr_info("%s: %s: trying to init card at %u Hz\n",
 			mmc_hostname(host), __func__, host->f_init);
-
+#endif

I first wrote this line while testing the patch for "configurable ID freq". I left it in thinking it would only trigger while booting or mounting a new card, not being aware of the MMC_CAP_NEEDS_POLL option. Sorry for that,