Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1247970 > unrolled thread

[PATCH V2 1/4] PM / OPP: Improve debug print messages with pr_fmt

Started byViresh Kumar <viresh.kumar@linaro.org>
First post2015-10-15 18:20 +0200
Last post2015-10-17 06:20 +0200
Articles 5 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH V2 1/4] PM / OPP: Improve debug print messages with pr_fmt Viresh Kumar <viresh.kumar@linaro.org> - 2015-10-15 18:20 +0200
    Re: [PATCH V2 1/4] PM / OPP: Improve debug print messages with pr_fmt Stephen Boyd <sboyd@codeaurora.org> - 2015-10-15 21:10 +0200
      Re: [PATCH V2 1/4] PM / OPP: Improve debug print messages with pr_fmt Viresh Kumar <viresh.kumar@linaro.org> - 2015-10-16 07:40 +0200
        Re: [PATCH V2 1/4] PM / OPP: Improve debug print messages with pr_fmt Stephen Boyd <sboyd@codeaurora.org> - 2015-10-16 21:30 +0200
          [PATCH V3 1/4] PM / OPP: Improve print messages with pr_fmt Viresh Kumar <viresh.kumar@linaro.org> - 2015-10-17 06:20 +0200

#1247970 — [PATCH V2 1/4] PM / OPP: Improve debug print messages with pr_fmt

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-10-15 18:20 +0200
Subject[PATCH V2 1/4] PM / OPP: Improve debug print messages with pr_fmt
Message-ID<qjTq4-3aG-67@gated-at.bofh.it>
With debug options on, it is difficult to locate OPP core's debug
prints. Fix this by prefixing OPP debug prints with KBUILD_MODNAME.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/base/power/opp/core.c | 2 ++
 drivers/base/power/opp/cpu.c  | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
index d5c1149ff123..a422ebf2501f 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -11,6 +11,8 @@
  * published by the Free Software Foundation.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/errno.h>
 #include <linux/err.h>
 #include <linux/slab.h>
diff --git a/drivers/base/power/opp/cpu.c b/drivers/base/power/opp/cpu.c
index 7654c5606307..c27a1cdffec9 100644
--- a/drivers/base/power/opp/cpu.c
+++ b/drivers/base/power/opp/cpu.c
@@ -10,6 +10,9 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/cpu.h>
 #include <linux/cpufreq.h>
 #include <linux/err.h>
-- 
2.4.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1248089

FromStephen Boyd <sboyd@codeaurora.org>
Date2015-10-15 21:10 +0200
Message-ID<qjW4x-7c7-5@gated-at.bofh.it>
In reply to#1247970
On 10/15, Viresh Kumar wrote:
> With debug options on, it is difficult to locate OPP core's debug
> prints. Fix this by prefixing OPP debug prints with KBUILD_MODNAME.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Why not use dynamic debug's m flag to turn on KBUILD_MODNAME when
debugging?

From Documentation/dynamic-debug-howto.txt

  m    Include module name in the printed message
-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1248344

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-10-16 07:40 +0200
Message-ID<qk5Ue-51N-5@gated-at.bofh.it>
In reply to#1248089
On 15-10-15, 12:04, Stephen Boyd wrote:
> On 10/15, Viresh Kumar wrote:
> > With debug options on, it is difficult to locate OPP core's debug
> > prints. Fix this by prefixing OPP debug prints with KBUILD_MODNAME.
> > 
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> 
> Why not use dynamic debug's m flag to turn on KBUILD_MODNAME when
> debugging?
> 
> >From Documentation/dynamic-debug-howto.txt
> 
>   m    Include module name in the printed message

It wasn't just about debug messages but pr_info and pr_err as well.
And so I defined pr_fmt instead.

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1249097

FromStephen Boyd <sboyd@codeaurora.org>
Date2015-10-16 21:30 +0200
Message-ID<qkiRt-7pv-31@gated-at.bofh.it>
In reply to#1248344
On 10/16, Viresh Kumar wrote:
> On 15-10-15, 12:04, Stephen Boyd wrote:
> > On 10/15, Viresh Kumar wrote:
> > > With debug options on, it is difficult to locate OPP core's debug
> > > prints. Fix this by prefixing OPP debug prints with KBUILD_MODNAME.
> > > 
> > > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > 
> > Why not use dynamic debug's m flag to turn on KBUILD_MODNAME when
> > debugging?
> > 
> > >From Documentation/dynamic-debug-howto.txt
> > 
> >   m    Include module name in the printed message
> 
> It wasn't just about debug messages but pr_info and pr_err as well.
> And so I defined pr_fmt instead.
> 

Ok, well the commit text exclusively mentions debug, leading me
to believe this is all about making the debug prints (i.e.
pr_debug) have KBUILD_MODNAME. 

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1249262 — [PATCH V3 1/4] PM / OPP: Improve print messages with pr_fmt

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-10-17 06:20 +0200
Subject[PATCH V3 1/4] PM / OPP: Improve print messages with pr_fmt
Message-ID<qkr8l-2Jf-7@gated-at.bofh.it>
In reply to#1249097
To identify OPP core's print messages easily, prefix them with
KBUILD_MODNAME.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
V2->V3:
- Improved commit-log.

 drivers/base/power/opp/core.c | 2 ++
 drivers/base/power/opp/cpu.c  | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
index d5c1149ff123..a422ebf2501f 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -11,6 +11,8 @@
  * published by the Free Software Foundation.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/errno.h>
 #include <linux/err.h>
 #include <linux/slab.h>
diff --git a/drivers/base/power/opp/cpu.c b/drivers/base/power/opp/cpu.c
index 7654c5606307..c27a1cdffec9 100644
--- a/drivers/base/power/opp/cpu.c
+++ b/drivers/base/power/opp/cpu.c
@@ -10,6 +10,9 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/cpu.h>
 #include <linux/cpufreq.h>
 #include <linux/err.h>
-- 
2.4.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web