Skip to content

pr_dbg, pr_fmt

Joe Perches kexec kvm linux-crypto linux-pm lkml netdev 1 version Applied

Status from this message: Applied to net-next-2.6

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest21 patches 23 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/21include/linux/ dynamic_debug.h kernel.h: Remove KBUILD_MODNAME from dynamic_pr_debug, add pr_dbginclude/linux/dynamic_debug.h include/linux/kernel.h+10 -100 replies
2/21ftrace.c: Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmtarch/x86/kernel/ftrace.c+5 -34 replies
3/21mtrr: use pr_<level> and pr_fmtarch/x86/kernel/cpu/mtrr/centaur.c arch/x86/kernel/cpu/mtrr/cleanup.c arch/x86/kernel/cpu/mtrr/generic.c +1 more+72 -620 replies
4/21microcode: use pr_<level> and add pr_fmtarch/x86/kernel/microcode_amd.c arch/x86/kernel/microcode_core.c arch/x86/kernel/microcode_intel.c+37 -380 replies
5/21amd_iommu.c: use pr_<level> and add pr_fmt(fmt)arch/x86/kernel/amd_iommu.c+37 -342 replies
6/21es7000_32.c: use pr_<level> and add pr_fmt(fmt)arch/x86/kernel/apic/es7000_32.c+7 -50 replies
7/21arch/x86/kernel/apic/: use pr_<level> and add pr_fmt(fmt)arch/x86/kernel/apic/apic.c arch/x86/kernel/apic/apic_flat_64.c arch/x86/kernel/apic/bigsmp_32.c +7 more+225 -2320 replies
8/21mcheck/: use pr_<level> and add pr_fmt(fmt)arch/x86/kernel/cpu/mcheck/mce-inject.c arch/x86/kernel/cpu/mcheck/mce.c arch/x86/kernel/cpu/mcheck/mce_intel.c +4 more+76 -680 replies
9/21arch/x86/kernel/setup_percpu.c: use pr_<level> and add pr_fmt(fmt)arch/x86/kernel/setup_percpu.c+7 -60 replies
10/21arch/x86/kernel/cpu/: use pr_<level> and add pr_fmt(fmt)arch/x86/kernel/cpu/addon_cpuid_features.c arch/x86/kernel/cpu/amd.c arch/x86/kernel/cpu/bugs.c +11 more+123 -1010 replies
11/21i8254.c: Add pr_fmt(fmt)arch/x86/kvm/i8254.c+7 -50 replies
12/21kmmio.c: Add and use pr_fmt(fmt)arch/x86/mm/kmmio.c+20 -200 replies
13/21testmmiotrace.c: Add and use pr_fmt(fmt)arch/x86/mm/testmmiotrace.c+14 -151 reply
14/21crypto/: use pr_<level> and add pr_fmt(fmt)crypto/algapi.c crypto/ansi_cprng.c crypto/async_tx/async_tx.c +4 more+198 -2320 replies
15/21kernel/power/: use pr_<level> and add pr_fmt(fmt)kernel/power/hibernate.c kernel/power/hibernate_nvs.c kernel/power/process.c +6 more+112 -1017 replies
16/21kernel/kexec.c: use pr_<level> and add pr_fmt(fmt)kernel/kexec.c+10 -112 replies
17/21crypto/async_tx/raid6test.c: use pr_<level> and add pr_fmt(fmt)crypto/async_tx/raid6test.c+15 -150 replies
18/21arch/x86/mm/mmio-mod.c: use pr_fmtarch/x86/mm/mmio-mod.c+35 -360 replies
19/21drivers/net/bonding/: : use pr_fmtdrivers/net/bonding/bond_3ad.c drivers/net/bonding/bond_alb.c drivers/net/bonding/bond_ipv6.c +2 more+464 -6871 reply
20/21drivers/net/tlan: use pr_<level> and add pr_fmt(fmt)drivers/net/tlan.c+68 -671 reply
21/21drivers/net/tlan.h: Convert printk(KERN_DEBUG to pr_dbg(drivers/net/tlan.h+1 -15 replies

Reviews trailers per patch

2 of 21 patches have a Reviewed-by or Acked-by.

PatchDavid S. MillerSteven Rostedt
1/21
2/21A-b A-b
3/21
4/21
5/21
6/21
7/21
8/21
9/21
10/21
11/21
12/21
13/21
14/21
15/21
16/21
17/21
18/21
19/21
20/21
21/21A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/21] pr_dbg, pr_fmt

One possible long term goal is to stop adding

    #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

to source files to prefix modulename to logging output.

It might be useful to eventually have kernel.h
use a standard #define pr_fmt which includes KBUILD_MODNAME instead of a blank or empty define.

Perhaps over time, the source modules that use pr_<level> with prefixes can be converted to use pr_fmt.

If all modules are converted, that will allow the printk routine to add module/filename/line/offset to the logging lines using some function similar to dynamic_debug and substantially reduct object string use by removing the repeated prefixes.

This patchset does not get to that result. The patches right now uses _more_ string space because all logging messages have unshared prefixes but it may be a useful start.

The patchset strips prefixes from printks and adds pr_fmt to arch/x86, crypto, kernel, and a few drivers.

It also converts printk(KERN_<level> to pr_<level> in a few files that already had some pr_<level> uses.

The conversion also generally used long length format strings in the place of multiple short strings to ease any grep/search.

Joe Perches (21):
include/linux/ dynamic_debug.h kernel.h: Remove KBUILD_MODNAME from dynamic_pr_debug, add #define pr_dbg ftrace.c: Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
mtrr: use pr_<level> and pr_fmt
microcode: use pr_<level> and add pr_fmt
amd_iommu.c: use pr_<level> and add pr_fmt(fmt)
es7000_32.c: use pr_<level> and add pr_fmt(fmt)
arch/x86/kernel/apic/: use pr_<level> and add pr_fmt(fmt)
mcheck/: use pr_<level> and add pr_fmt(fmt)
arch/x86/kernel/setup_percpu.c: use pr_<level> and add pr_fmt(fmt) arch/x86/kernel/cpu/: use pr_<level> and add pr_fmt(fmt)
i8254.c: Add pr_fmt(fmt)
kmmio.c: Add and use pr_fmt(fmt)
testmmiotrace.c: Add and use pr_fmt(fmt)
crypto/: use pr_<level> and add pr_fmt(fmt)
kernel/power/: use pr_<level> and add pr_fmt(fmt)
kernel/kexec.c: use pr_<level> and add pr_fmt(fmt)
crypto/async_tx/raid6test.c: use pr_<level> and add pr_fmt(fmt)
arch/x86/mm/mmio-mod.c: use pr_fmt
drivers/net/bonding/: : use pr_fmt
drivers/net/tlan: use pr_<level> and add pr_fmt(fmt)
drivers/net/tlan.h: Convert printk(KERN_DEBUG to pr_dbg(

 arch/x86/kernel/amd_iommu.c                |   71 ++--
 arch/x86/kernel/apic/apic.c                |   48 ++--
 arch/x86/kernel/apic/apic_flat_64.c        |    5 +-
 arch/x86/kernel/apic/bigsmp_32.c           |    8 +-
 arch/x86/kernel/apic/es7000_32.c           |   12 +-
 arch/x86/kernel/apic/io_apic.c             |  239 ++++++------
 arch/x86/kernel/apic/nmi.c                 |   29 +-
 arch/x86/kernel/apic/numaq_32.c            |   53 ++--
 arch/x86/kernel/apic/probe_32.c            |   18 +-
 arch/x86/kernel/apic/probe_64.c            |    8 +-
 arch/x86/kernel/apic/summit_32.c           |   23 +-
 arch/x86/kernel/apic/x2apic_uv_x.c         |   26 +-
 arch/x86/kernel/cpu/addon_cpuid_features.c |    9 +-
 arch/x86/kernel/cpu/amd.c                  |   26 +-
 arch/x86/kernel/cpu/bugs.c                 |   23 +-
 arch/x86/kernel/cpu/bugs_64.c              |    4 +-
 arch/x86/kernel/cpu/centaur.c              |   12 +-
 arch/x86/kernel/cpu/common.c               |   54 ++--
 arch/x86/kernel/cpu/cpu_debug.c            |    4 +-
 arch/x86/kernel/cpu/cyrix.c                |   12 +-
 arch/x86/kernel/cpu/intel.c                |   14 +-
 arch/x86/kernel/cpu/intel_cacheinfo.c      |   14 +-
 arch/x86/kernel/cpu/mcheck/mce-inject.c    |   20 +-
 arch/x86/kernel/cpu/mcheck/mce.c           |   59 ++--
 arch/x86/kernel/cpu/mcheck/mce_intel.c     |    8 +-
 arch/x86/kernel/cpu/mcheck/p5.c            |   21 +-
 arch/x86/kernel/cpu/mcheck/therm_throt.c   |   21 +-
 arch/x86/kernel/cpu/mcheck/threshold.c     |    7 +-
 arch/x86/kernel/cpu/mcheck/winchip.c       |    8 +-
 arch/x86/kernel/cpu/mtrr/centaur.c         |    4 +-
 arch/x86/kernel/cpu/mtrr/cleanup.c         |   59 ++--
 arch/x86/kernel/cpu/mtrr/generic.c         |   39 +-
 arch/x86/kernel/cpu/mtrr/main.c            |   32 +-
 arch/x86/kernel/cpu/perf_event.c           |   10 +-
 arch/x86/kernel/cpu/perfctr-watchdog.c     |   11 +-
 arch/x86/kernel/cpu/transmeta.c            |   20 +-
 arch/x86/kernel/cpu/vmware.c               |   11 +-
 arch/x86/kernel/ftrace.c                   |    8 +-
 arch/x86/kernel/microcode_amd.c            |    5 +-
 arch/x86/kernel/microcode_core.c           |   23 +-
 arch/x86/kernel/microcode_intel.c          |   47 +--
 arch/x86/kernel/setup_percpu.c             |   13 +-
 arch/x86/kvm/i8254.c                       |   12 +-
 arch/x86/mm/kmmio.c                        |   40 +-
 arch/x86/mm/mmio-mod.c                     |   71 ++--
 arch/x86/mm/testmmiotrace.c                |   29 +-
 crypto/algapi.c                            |    4 +-
 crypto/ansi_cprng.c                        |   39 +-
 crypto/async_tx/async_tx.c                 |    5 +-
 crypto/async_tx/raid6test.c                |   30 +-
 crypto/fips.c                              |    4 +-
 crypto/tcrypt.c                            |   75 ++--
 crypto/testmgr.c                           |  286 ++++++--------
 crypto/xor.c                               |   17 +-
 drivers/net/bonding/bond_3ad.c             |  171 +++++----
 drivers/net/bonding/bond_alb.c             |   38 +--
 drivers/net/bonding/bond_ipv6.c            |   12 +-
 drivers/net/bonding/bond_main.c            |  608 +++++++++++-----------------
 drivers/net/bonding/bond_sysfs.c           |  322 ++++++---------
 drivers/net/tlan.c                         |  135 +++---
 drivers/net/tlan.h                         |    2 +-
 include/linux/dynamic_debug.h              |   13 +-
 include/linux/kernel.h                     |    7 +-
 kernel/kexec.c                             |   21 +-
 kernel/power/hibernate.c                   |   46 +--
 kernel/power/hibernate_nvs.c               |    6 +-
 kernel/power/process.c                     |   29 +-
 kernel/power/snapshot.c                    |   36 +-
 kernel/power/suspend.c                     |   18 +-
 kernel/power/suspend_test.c                |   18 +-
 kernel/power/swap.c                        |   42 +-
 kernel/power/swsusp.c                      |   10 +-
 kernel/power/user.c                        |    8 +-
 73 files changed, 1543 insertions(+), 1749 deletions(-)