linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] msm: smd: Reduce driver log chatter
@ 2010-11-10  0:30 David Brown
  2010-11-10  0:49 ` [PATCH v2] " David Brown
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: David Brown @ 2010-11-10  0:30 UTC (permalink / raw)
  To: linux-arm-msm, Daniel Walker; +Cc: linux-arm-kernel, linux-kernel, David Brown

The MSM smd driver logs numerous messages during startup that are
useful for debug purposes.  Change these to pr_debug() to match their
purpose.

Signed-off-by: David Brown <davidb@codeaurora.org>
---
 arch/arm/mach-msm/smd.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
index f07dc7c..544e4de 100644
--- a/arch/arm/mach-msm/smd.c
+++ b/arch/arm/mach-msm/smd.c
@@ -89,7 +89,7 @@ static void smd_diag(void)
 	x = smem_find(ID_DIAG_ERR_MSG, SZ_DIAG_ERR_MSG);
 	if (x != 0) {
 		x[SZ_DIAG_ERR_MSG - 1] = 0;
-		pr_info("smem: DIAG '%s'\n", x);
+		pr_debug("smem: DIAG '%s'\n", x);
 	}
 }
 
@@ -312,7 +312,7 @@ static void smd_state_change(struct smd_channel *ch,
 {
 	ch->last_state = next;
 
-	pr_info("SMD: ch %d %d -> %d\n", ch->n, last, next);
+	pr_debug("SMD: ch %d %d -> %d\n", ch->n, last, next);
 
 	switch (next) {
 	case SMD_SS_OPENING:
@@ -601,7 +601,7 @@ static int smd_alloc_channel(const char *name, uint32_t cid, uint32_t type)
 	ch->pdev.name = ch->name;
 	ch->pdev.id = -1;
 
-	pr_info("smd_alloc_channel() cid=%02d size=%05d '%s'\n",
+	pr_debug("smd_alloc_channel() cid=%02d size=%05d '%s'\n",
 		ch->n, ch->fifo_size, ch->name);
 
 	mutex_lock(&smd_creation_mutex);
@@ -725,7 +725,7 @@ int smd_close(smd_channel_t *ch)
 {
 	unsigned long flags;
 
-	pr_info("smd_close(%p)\n", ch);
+	pr_debug("smd_close(%p)\n", ch);
 
 	if (ch == 0)
 		return -1;
@@ -939,7 +939,7 @@ int smsm_set_sleep_duration(uint32_t delay)
 int smd_core_init(void)
 {
 	int r;
-	pr_info("smd_core_init()\n");
+	pr_debug("smd_core_init()\n");
 
 	/* wait for essential items to be initialized */
 	for (;;) {
@@ -992,14 +992,14 @@ int smd_core_init(void)
 	smsm_change_state(SMSM_STATE_APPS_DEM, ~0, 0);
 #endif
 
-	pr_info("smd_core_init() done\n");
+	pr_debug("smd_core_init() done\n");
 
 	return 0;
 }
 
 static int __devinit msm_smd_probe(struct platform_device *pdev)
 {
-	pr_info("smd_init()\n");
+	pr_debug("smd_init()\n");
 
 	/*
 	 * If we haven't waited for the ARM9 to boot up till now,
-- 
1.7.3.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2] msm: smd: Reduce driver log chatter
  2010-11-10  0:30 [PATCH] msm: smd: Reduce driver log chatter David Brown
@ 2010-11-10  0:49 ` David Brown
  2010-11-10  0:56   ` Joe Perches
  2010-11-10 17:59 ` [PATCH v3] " David Brown
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: David Brown @ 2010-11-10  0:49 UTC (permalink / raw)
  To: linux-arm-msm, Daniel Walker
  Cc: linux-arm-kernel, linux-kernel, David Brown, Brian Swetland,
	Arve Hjønnevåg

The MSM smd driver logs numerous messages during startup that are
useful for debug purposes.  Change these to pr_debug() to match their
purpose.

Cc: Brian Swetland <swetland@google.com>
Cc: Arve Hjønnevåg <arve@android.com>
Signed-off-by: David Brown <davidb@codeaurora.org>
---
 arch/arm/mach-msm/smd.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
index f07dc7c..37b35fb 100644
--- a/arch/arm/mach-msm/smd.c
+++ b/arch/arm/mach-msm/smd.c
@@ -14,6 +14,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/platform_device.h>
 #include <linux/module.h>
 #include <linux/fs.h>
@@ -89,7 +91,7 @@ static void smd_diag(void)
 	x = smem_find(ID_DIAG_ERR_MSG, SZ_DIAG_ERR_MSG);
 	if (x != 0) {
 		x[SZ_DIAG_ERR_MSG - 1] = 0;
-		pr_info("smem: DIAG '%s'\n", x);
+		pr_debug("smem: DIAG '%s'\n", x);
 	}
 }
 
@@ -312,7 +314,7 @@ static void smd_state_change(struct smd_channel *ch,
 {
 	ch->last_state = next;
 
-	pr_info("SMD: ch %d %d -> %d\n", ch->n, last, next);
+	pr_debug("SMD: ch %d %d -> %d\n", ch->n, last, next);
 
 	switch (next) {
 	case SMD_SS_OPENING:
@@ -601,7 +603,7 @@ static int smd_alloc_channel(const char *name, uint32_t cid, uint32_t type)
 	ch->pdev.name = ch->name;
 	ch->pdev.id = -1;
 
-	pr_info("smd_alloc_channel() cid=%02d size=%05d '%s'\n",
+	pr_debug("smd_alloc_channel() cid=%02d size=%05d '%s'\n",
 		ch->n, ch->fifo_size, ch->name);
 
 	mutex_lock(&smd_creation_mutex);
@@ -725,7 +727,7 @@ int smd_close(smd_channel_t *ch)
 {
 	unsigned long flags;
 
-	pr_info("smd_close(%p)\n", ch);
+	pr_debug("smd_close(%p)\n", ch);
 
 	if (ch == 0)
 		return -1;
@@ -939,7 +941,7 @@ int smsm_set_sleep_duration(uint32_t delay)
 int smd_core_init(void)
 {
 	int r;
-	pr_info("smd_core_init()\n");
+	pr_debug("smd_core_init()\n");
 
 	/* wait for essential items to be initialized */
 	for (;;) {
@@ -992,14 +994,14 @@ int smd_core_init(void)
 	smsm_change_state(SMSM_STATE_APPS_DEM, ~0, 0);
 #endif
 
-	pr_info("smd_core_init() done\n");
+	pr_debug("smd_core_init() done\n");
 
 	return 0;
 }
 
 static int __devinit msm_smd_probe(struct platform_device *pdev)
 {
-	pr_info("smd_init()\n");
+	pr_debug("smd_init()\n");
 
 	/*
 	 * If we haven't waited for the ARM9 to boot up till now,
-- 
1.7.3.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] msm: smd: Reduce driver log chatter
  2010-11-10  0:49 ` [PATCH v2] " David Brown
@ 2010-11-10  0:56   ` Joe Perches
  0 siblings, 0 replies; 9+ messages in thread
From: Joe Perches @ 2010-11-10  0:56 UTC (permalink / raw)
  To: David Brown
  Cc: linux-arm-msm, Daniel Walker, linux-arm-kernel, linux-kernel,
	Brian Swetland, Arve Hjønnevåg

On Tue, 2010-11-09 at 16:49 -0800, David Brown wrote:
> The MSM smd driver logs numerous messages during startup that are
> useful for debug purposes.  Change these to pr_debug() to match their
> purpose.
> diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
[]
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

If you add this, you probably want to strip
a few prefixes from the formats.

> +
>  #include <linux/platform_device.h>
>  #include <linux/module.h>
>  #include <linux/fs.h>
> @@ -89,7 +91,7 @@ static void smd_diag(void)
[]
> -		pr_info("smem: DIAG '%s'\n", x);
> +		pr_debug("smem: DIAG '%s'\n", x);

probably just
		pr_debug("DIAG '%s'\n", x);

>  	}
>  }
>  
> @@ -312,7 +314,7 @@ static void smd_state_change(struct smd_channel *ch,
[]
> -	pr_info("SMD: ch %d %d -> %d\n", ch->n, last, next);
> +	pr_debug("SMD: ch %d %d -> %d\n", ch->n, last, next);

	pr_debug("ch %d %d -> %d\n", ch->n, last, next);



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v3] msm: smd: Reduce driver log chatter
  2010-11-10  0:30 [PATCH] msm: smd: Reduce driver log chatter David Brown
  2010-11-10  0:49 ` [PATCH v2] " David Brown
@ 2010-11-10 17:59 ` David Brown
  2010-11-10 18:24   ` Joe Perches
  2010-11-11 22:54 ` [PATCH v4] " David Brown
  2010-11-12 21:49 ` [PATCH v5] " David Brown
  3 siblings, 1 reply; 9+ messages in thread
From: David Brown @ 2010-11-10 17:59 UTC (permalink / raw)
  To: linux-arm-msm, Daniel Walker
  Cc: linux-arm-kernel, linux-kernel, David Brown, Brian Swetland,
	Arve Hjønnevåg

The MSM smd driver logs numerous messages during startup that are
useful for debug purposes.  Change these to pr_debug() to match their
purpose.

Cc: Brian Swetland <swetland@google.com>
Cc: Arve Hjønnevåg <arve@android.com>
Signed-off-by: David Brown <davidb@codeaurora.org>
---
This addresses all of the feedback I've gotten so far.

 arch/arm/mach-msm/smd.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
index f07dc7c..2673527 100644
--- a/arch/arm/mach-msm/smd.c
+++ b/arch/arm/mach-msm/smd.c
@@ -14,6 +14,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/platform_device.h>
 #include <linux/module.h>
 #include <linux/fs.h>
@@ -89,7 +91,7 @@ static void smd_diag(void)
 	x = smem_find(ID_DIAG_ERR_MSG, SZ_DIAG_ERR_MSG);
 	if (x != 0) {
 		x[SZ_DIAG_ERR_MSG - 1] = 0;
-		pr_info("smem: DIAG '%s'\n", x);
+		pr_debug("DIAG '%s'\n", x);
 	}
 }
 
@@ -312,7 +314,7 @@ static void smd_state_change(struct smd_channel *ch,
 {
 	ch->last_state = next;
 
-	pr_info("SMD: ch %d %d -> %d\n", ch->n, last, next);
+	pr_debug("ch %d %d -> %d\n", ch->n, last, next);
 
 	switch (next) {
 	case SMD_SS_OPENING:
@@ -601,7 +603,7 @@ static int smd_alloc_channel(const char *name, uint32_t cid, uint32_t type)
 	ch->pdev.name = ch->name;
 	ch->pdev.id = -1;
 
-	pr_info("smd_alloc_channel() cid=%02d size=%05d '%s'\n",
+	pr_debug("smd_alloc_channel() cid=%02d size=%05d '%s'\n",
 		ch->n, ch->fifo_size, ch->name);
 
 	mutex_lock(&smd_creation_mutex);
@@ -621,7 +623,7 @@ static void smd_channel_probe_worker(struct work_struct *work)
 
 	shared = smem_find(ID_CH_ALLOC_TBL, sizeof(*shared) * 64);
 	if (!shared) {
-		pr_err("smd: cannot find allocation table\n");
+		pr_err("cannot find allocation table\n");
 		return;
 	}
 	for (n = 0; n < 64; n++) {
@@ -725,7 +727,7 @@ int smd_close(smd_channel_t *ch)
 {
 	unsigned long flags;
 
-	pr_info("smd_close(%p)\n", ch);
+	pr_debug("smd_close(%p)\n", ch);
 
 	if (ch == 0)
 		return -1;
@@ -939,7 +941,7 @@ int smsm_set_sleep_duration(uint32_t delay)
 int smd_core_init(void)
 {
 	int r;
-	pr_info("smd_core_init()\n");
+	pr_debug("smd_core_init()\n");
 
 	/* wait for essential items to be initialized */
 	for (;;) {
@@ -992,14 +994,14 @@ int smd_core_init(void)
 	smsm_change_state(SMSM_STATE_APPS_DEM, ~0, 0);
 #endif
 
-	pr_info("smd_core_init() done\n");
+	pr_debug("smd_core_init() done\n");
 
 	return 0;
 }
 
 static int __devinit msm_smd_probe(struct platform_device *pdev)
 {
-	pr_info("smd_init()\n");
+	pr_debug("smd_init()\n");
 
 	/*
 	 * If we haven't waited for the ARM9 to boot up till now,
-- 
1.7.3.2

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v3] msm: smd: Reduce driver log chatter
  2010-11-10 17:59 ` [PATCH v3] " David Brown
@ 2010-11-10 18:24   ` Joe Perches
  2010-11-10 18:34     ` Brian Swetland
  0 siblings, 1 reply; 9+ messages in thread
From: Joe Perches @ 2010-11-10 18:24 UTC (permalink / raw)
  To: David Brown
  Cc: linux-arm-msm, Daniel Walker, linux-arm-kernel, linux-kernel,
	Brian Swetland, Arve Hjønnevåg

On Wed, 2010-11-10 at 09:59 -0800, David Brown wrote:
>  arch/arm/mach-msm/smd.c |   18 ++++++++++--------

Hi again David.  More trivia. Ignore at your pleasure.

>  1 files changed, 10 insertions(+), 8 deletions(-)
> diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c

A moderately common kernel style uses macros like:

#define FUNC_ENTER()	pr_debug("--> %s\n", __func__);
#define FUNC_EXIT()	pr_debug("<-- %s\n", __func__);
or
#define FUNC_ENTER()	pr_debug("Enter %s\n", __func__);
#define FUNC_EXIT()	pr_debug("Exit  %s\n", __func__);

The macro names vary.
I've seen enter, _enter, kenter, func_enter, etc.

> @@ -939,7 +941,7 @@ int smsm_set_sleep_duration(uint32_t delay)
>  int smd_core_init(void)
>  {
>  	int r;
> -	pr_info("smd_core_init()\n");
> +	pr_debug("smd_core_init()\n");

	FUNC_ENTER();

> @@ -992,14 +994,14 @@ int smd_core_init(void)
>  	smsm_change_state(SMSM_STATE_APPS_DEM, ~0, 0);
>  #endif
>  
> -	pr_info("smd_core_init() done\n");
> +	pr_debug("smd_core_init() done\n");

	FUNC_EXIT();

>  static int __devinit msm_smd_probe(struct platform_device *pdev)
>  {
> -	pr_info("smd_init()\n");
> +	pr_debug("smd_init()\n");

wrong function name? FUNC_ENTER();


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v3] msm: smd: Reduce driver log chatter
  2010-11-10 18:24   ` Joe Perches
@ 2010-11-10 18:34     ` Brian Swetland
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Swetland @ 2010-11-10 18:34 UTC (permalink / raw)
  To: Joe Perches
  Cc: David Brown, linux-arm-msm, Daniel Walker, linux-arm-kernel,
	linux-kernel, Arve Hjønnevåg

At this point, I think we could just drop the printk()s on the init
functions.  They date back from when we first brought up the driver
and I'm not sure they're of much value at all any more.

Brian

On Wed, Nov 10, 2010 at 10:24 AM, Joe Perches <joe@perches.com> wrote:
> On Wed, 2010-11-10 at 09:59 -0800, David Brown wrote:
>>  arch/arm/mach-msm/smd.c |   18 ++++++++++--------
>
> Hi again David.  More trivia. Ignore at your pleasure.
>
>>  1 files changed, 10 insertions(+), 8 deletions(-)
>> diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
>
> A moderately common kernel style uses macros like:
>
> #define FUNC_ENTER()    pr_debug("--> %s\n", __func__);
> #define FUNC_EXIT()     pr_debug("<-- %s\n", __func__);
> or
> #define FUNC_ENTER()    pr_debug("Enter %s\n", __func__);
> #define FUNC_EXIT()     pr_debug("Exit  %s\n", __func__);
>
> The macro names vary.
> I've seen enter, _enter, kenter, func_enter, etc.
>
>> @@ -939,7 +941,7 @@ int smsm_set_sleep_duration(uint32_t delay)
>>  int smd_core_init(void)
>>  {
>>       int r;
>> -     pr_info("smd_core_init()\n");
>> +     pr_debug("smd_core_init()\n");
>
>        FUNC_ENTER();
>
>> @@ -992,14 +994,14 @@ int smd_core_init(void)
>>       smsm_change_state(SMSM_STATE_APPS_DEM, ~0, 0);
>>  #endif
>>
>> -     pr_info("smd_core_init() done\n");
>> +     pr_debug("smd_core_init() done\n");
>
>        FUNC_EXIT();
>
>>  static int __devinit msm_smd_probe(struct platform_device *pdev)
>>  {
>> -     pr_info("smd_init()\n");
>> +     pr_debug("smd_init()\n");
>
> wrong function name? FUNC_ENTER();
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v4] msm: smd: Reduce driver log chatter
  2010-11-10  0:30 [PATCH] msm: smd: Reduce driver log chatter David Brown
  2010-11-10  0:49 ` [PATCH v2] " David Brown
  2010-11-10 17:59 ` [PATCH v3] " David Brown
@ 2010-11-11 22:54 ` David Brown
  2010-11-12  4:22   ` Joe Perches
  2010-11-12 21:49 ` [PATCH v5] " David Brown
  3 siblings, 1 reply; 9+ messages in thread
From: David Brown @ 2010-11-11 22:54 UTC (permalink / raw)
  To: linux-arm-msm, Daniel Walker
  Cc: linux-arm-kernel, linux-kernel, David Brown, Brian Swetland,
	Arve Hjønnevåg

The MSM smd driver logs numerous messages during startup that are
useful for debug purposes.  Change some of these to pr_debug() to
match their purpose, and remove others that aren't really useful.

Cc: Brian Swetland <swetland@google.com>
Cc: Arve Hjønnevåg <arve@android.com>
Signed-off-by: David Brown <davidb@codeaurora.org>
---
 arch/arm/mach-msm/smd.c |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
index f07dc7c..eec464f 100644
--- a/arch/arm/mach-msm/smd.c
+++ b/arch/arm/mach-msm/smd.c
@@ -14,6 +14,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/platform_device.h>
 #include <linux/module.h>
 #include <linux/fs.h>
@@ -89,7 +91,7 @@ static void smd_diag(void)
 	x = smem_find(ID_DIAG_ERR_MSG, SZ_DIAG_ERR_MSG);
 	if (x != 0) {
 		x[SZ_DIAG_ERR_MSG - 1] = 0;
-		pr_info("smem: DIAG '%s'\n", x);
+		pr_debug("DIAG '%s'\n", x);
 	}
 }
 
@@ -312,7 +314,7 @@ static void smd_state_change(struct smd_channel *ch,
 {
 	ch->last_state = next;
 
-	pr_info("SMD: ch %d %d -> %d\n", ch->n, last, next);
+	pr_debug("ch %d %d -> %d\n", ch->n, last, next);
 
 	switch (next) {
 	case SMD_SS_OPENING:
@@ -601,7 +603,7 @@ static int smd_alloc_channel(const char *name, uint32_t cid, uint32_t type)
 	ch->pdev.name = ch->name;
 	ch->pdev.id = -1;
 
-	pr_info("smd_alloc_channel() cid=%02d size=%05d '%s'\n",
+	pr_debug("smd_alloc_channel() cid=%02d size=%05d '%s'\n",
 		ch->n, ch->fifo_size, ch->name);
 
 	mutex_lock(&smd_creation_mutex);
@@ -621,7 +623,7 @@ static void smd_channel_probe_worker(struct work_struct *work)
 
 	shared = smem_find(ID_CH_ALLOC_TBL, sizeof(*shared) * 64);
 	if (!shared) {
-		pr_err("smd: cannot find allocation table\n");
+		pr_err("cannot find allocation table\n");
 		return;
 	}
 	for (n = 0; n < 64; n++) {
@@ -725,7 +727,7 @@ int smd_close(smd_channel_t *ch)
 {
 	unsigned long flags;
 
-	pr_info("smd_close(%p)\n", ch);
+	pr_debug("smd_close(%p)\n", ch);
 
 	if (ch == 0)
 		return -1;
@@ -939,7 +941,6 @@ int smsm_set_sleep_duration(uint32_t delay)
 int smd_core_init(void)
 {
 	int r;
-	pr_info("smd_core_init()\n");
 
 	/* wait for essential items to be initialized */
 	for (;;) {
@@ -992,15 +993,11 @@ int smd_core_init(void)
 	smsm_change_state(SMSM_STATE_APPS_DEM, ~0, 0);
 #endif
 
-	pr_info("smd_core_init() done\n");
-
 	return 0;
 }
 
 static int __devinit msm_smd_probe(struct platform_device *pdev)
 {
-	pr_info("smd_init()\n");
-
 	/*
 	 * If we haven't waited for the ARM9 to boot up till now,
 	 * then we need to wait here. Otherwise this should just
-- 
1.7.3.2

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v4] msm: smd: Reduce driver log chatter
  2010-11-11 22:54 ` [PATCH v4] " David Brown
@ 2010-11-12  4:22   ` Joe Perches
  0 siblings, 0 replies; 9+ messages in thread
From: Joe Perches @ 2010-11-12  4:22 UTC (permalink / raw)
  To: David Brown
  Cc: linux-arm-msm, Daniel Walker, linux-arm-kernel, linux-kernel,
	Brian Swetland, Arve Hjønnevåg

On Thu, 2010-11-11 at 14:54 -0800, David Brown wrote:
> The MSM smd driver logs numerous messages during startup that are
> useful for debug purposes.  Change some of these to pr_debug() to
> match their purpose, and remove others that aren't really useful.

Hi David.

>  arch/arm/mach-msm/smd.c |   17 +++++++----------
> @@ -725,7 +727,7 @@ int smd_close(smd_channel_t *ch)
>  {
>  	unsigned long flags;
>  
> -	pr_info("smd_close(%p)\n", ch);
> +	pr_debug("smd_close(%p)\n", ch);

Why keep a printk for close without a printk for open?
I suggest removing this one too.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v5] msm: smd: Reduce driver log chatter
  2010-11-10  0:30 [PATCH] msm: smd: Reduce driver log chatter David Brown
                   ` (2 preceding siblings ...)
  2010-11-11 22:54 ` [PATCH v4] " David Brown
@ 2010-11-12 21:49 ` David Brown
  3 siblings, 0 replies; 9+ messages in thread
From: David Brown @ 2010-11-12 21:49 UTC (permalink / raw)
  To: linux-arm-msm, Daniel Walker
  Cc: linux-arm-kernel, linux-kernel, David Brown, Brian Swetland,
	Arve Hjønnevåg

The MSM smd driver logs numerous messages during startup that are
useful for debug purposes.  Change some of these to pr_debug() to
match their purpose, and remove others that aren't really useful.

Cc: Brian Swetland <swetland@google.com>
Cc: Arve Hjønnevåg <arve@android.com>
Signed-off-by: David Brown <davidb@codeaurora.org>
---
 arch/arm/mach-msm/smd.c |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
index f07dc7c..657be73 100644
--- a/arch/arm/mach-msm/smd.c
+++ b/arch/arm/mach-msm/smd.c
@@ -14,6 +14,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/platform_device.h>
 #include <linux/module.h>
 #include <linux/fs.h>
@@ -89,7 +91,7 @@ static void smd_diag(void)
 	x = smem_find(ID_DIAG_ERR_MSG, SZ_DIAG_ERR_MSG);
 	if (x != 0) {
 		x[SZ_DIAG_ERR_MSG - 1] = 0;
-		pr_info("smem: DIAG '%s'\n", x);
+		pr_debug("DIAG '%s'\n", x);
 	}
 }
 
@@ -312,7 +314,7 @@ static void smd_state_change(struct smd_channel *ch,
 {
 	ch->last_state = next;
 
-	pr_info("SMD: ch %d %d -> %d\n", ch->n, last, next);
+	pr_debug("ch %d %d -> %d\n", ch->n, last, next);
 
 	switch (next) {
 	case SMD_SS_OPENING:
@@ -601,7 +603,7 @@ static int smd_alloc_channel(const char *name, uint32_t cid, uint32_t type)
 	ch->pdev.name = ch->name;
 	ch->pdev.id = -1;
 
-	pr_info("smd_alloc_channel() cid=%02d size=%05d '%s'\n",
+	pr_debug("smd_alloc_channel() cid=%02d size=%05d '%s'\n",
 		ch->n, ch->fifo_size, ch->name);
 
 	mutex_lock(&smd_creation_mutex);
@@ -621,7 +623,7 @@ static void smd_channel_probe_worker(struct work_struct *work)
 
 	shared = smem_find(ID_CH_ALLOC_TBL, sizeof(*shared) * 64);
 	if (!shared) {
-		pr_err("smd: cannot find allocation table\n");
+		pr_err("cannot find allocation table\n");
 		return;
 	}
 	for (n = 0; n < 64; n++) {
@@ -725,8 +727,6 @@ int smd_close(smd_channel_t *ch)
 {
 	unsigned long flags;
 
-	pr_info("smd_close(%p)\n", ch);
-
 	if (ch == 0)
 		return -1;
 
@@ -939,7 +939,6 @@ int smsm_set_sleep_duration(uint32_t delay)
 int smd_core_init(void)
 {
 	int r;
-	pr_info("smd_core_init()\n");
 
 	/* wait for essential items to be initialized */
 	for (;;) {
@@ -992,15 +991,11 @@ int smd_core_init(void)
 	smsm_change_state(SMSM_STATE_APPS_DEM, ~0, 0);
 #endif
 
-	pr_info("smd_core_init() done\n");
-
 	return 0;
 }
 
 static int __devinit msm_smd_probe(struct platform_device *pdev)
 {
-	pr_info("smd_init()\n");
-
 	/*
 	 * If we haven't waited for the ARM9 to boot up till now,
 	 * then we need to wait here. Otherwise this should just
-- 
1.7.3.2

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-11-12 21:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-10  0:30 [PATCH] msm: smd: Reduce driver log chatter David Brown
2010-11-10  0:49 ` [PATCH v2] " David Brown
2010-11-10  0:56   ` Joe Perches
2010-11-10 17:59 ` [PATCH v3] " David Brown
2010-11-10 18:24   ` Joe Perches
2010-11-10 18:34     ` Brian Swetland
2010-11-11 22:54 ` [PATCH v4] " David Brown
2010-11-12  4:22   ` Joe Perches
2010-11-12 21:49 ` [PATCH v5] " David Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).