linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/18] Convert default pr_fmt from empty to KBUILD_MODNAME
@ 2018-05-10 15:45 Joe Perches
  2018-05-10 15:45 ` [PATCH 01/18] kernel: Use pr_fmt Joe Perches
                   ` (17 more replies)
  0 siblings, 18 replies; 70+ messages in thread
From: Joe Perches @ 2018-05-10 15:45 UTC (permalink / raw)
  To: Steven Rostedt, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Mathieu Desnoyers, Lai Jiangshan, Andy Lutomirski, Will Drewry,
	linux-block, linux-crypto, netdev, linux-fbdev, linux-audit,
	linux-kernel, iommu, netfilter-devel, coreteam, linux-integrity,
	keyrings, selinux
  Cc: dri-devel, linux-security-module

pr_<level> logging uses allow a prefix to be specified with a
specific #define pr_fmt

The default of pr_fmt in printk.h is #define pr_fmt(fmt) fmt
so no prefixing of logging output is generically done.

There are several output logging uses like dump_stack() that are
unprefixed and should remain unprefixed.

This patch series attempts to convert the default #define of pr_fmt to
KBUILD_MODNAME ": " fmt and as well update the various bits of the kernel
that should _not_ be prefixed by adding #define pr_fmt(fmt) fmt to those
compilation units that do not want output message prefixing.

There are about 1200 uses of #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
that could be removed if the default is changed.

A script that does this removal (and removes any blank lines that follow)
for the linux-kernel tree is included below:

$ git grep -P --name-only "define\s+pr_fmt\b" | \
  grep -v include/linux/printk.h | \
  xargs perl -i -e 'local $/; while (<>) {s/(\n)*[ \t]*#[ \t]*define[ \t]+pr_fmt[ \t]*\([ \t]*(\w+)[ \t]*\)[ \t]*KBUILD_MODNAME[ \t]*\": \"[ \t]*\2[ \t]*\n\s*/\1\n/; s/^\n//; print;}'

This script should be run after this patch series is applied.

The above script output diff is currently:

1198 files changed, 70 insertions(+), 2241 deletions(-)

Joe Perches (18):
  kernel: Use pr_fmt
  lib: Use pr_fmt
  printk: Convert pr_fmt from blank define to KBUILD_MODNAME
  x86: Remove pr_fmt duplicate logging prefixes
  x86/mtrr: Rename main.c to mtrr.c and remove duplicate prefixes
  net: Remove pr_fmt duplicate logging prefixes
  blk-mq: Remove pr_fmt duplicate logging prefixes
  random: Remove pr_fmt duplicate logging prefixes
  ptp: Remove pr_fmt duplicate logging prefixes
  efifb: Remove pr_fmt duplicate logging prefixes
  proc: Remove pr_fmt duplicate logging prefixes
  uprobes: Remove pr_fmt duplicate logging prefixes
  printk: Remove pr_fmt duplicate logging prefixes
  lib/mpi: Remove pr_fmt duplicate logging prefixes
  security: Remove pr_fmt duplicate logging prefixes
  aoe: Remove pr_fmt duplicate logging prefixes
  security: encrypted-keys: Remove pr_fmt duplicate logging prefixes
  rcu: Use pr_fmt to prefix "rcu: " to logging output

 arch/x86/events/amd/ibs.c                      |  2 +-
 arch/x86/kernel/cpu/mtrr/Makefile              |  2 +-
 arch/x86/kernel/cpu/mtrr/{main.c => mtrr.c}    | 33 ++++++-------
 arch/x86/kernel/e820.c                         | 32 ++++++------
 arch/x86/kernel/hpet.c                         |  5 +-
 arch/x86/kernel/uprobes.c                      |  4 +-
 arch/x86/mm/numa.c                             | 22 ++++-----
 block/blk-mq.c                                 |  9 ++--
 drivers/block/aoe/aoeblk.c                     | 29 ++++++-----
 drivers/block/aoe/aoechr.c                     | 11 ++---
 drivers/block/aoe/aoecmd.c                     | 34 ++++++-------
 drivers/block/aoe/aoedev.c                     | 19 +++-----
 drivers/block/aoe/aoemain.c                    |  6 +--
 drivers/block/aoe/aoenet.c                     | 19 +++-----
 drivers/char/hw_random/via-rng.c               | 10 ++--
 drivers/char/random.c                          | 16 +++---
 drivers/ptp/ptp_clock.c                        |  4 +-
 drivers/video/fbdev/efifb.c                    | 48 +++++++++---------
 fs/proc/root.c                                 |  6 +--
 include/linux/printk.h                         |  2 +-
 kernel/acct.c                                  |  2 +
 kernel/async.c                                 | 14 +++---
 kernel/audit_tree.c                            |  2 +-
 kernel/backtracetest.c                         |  8 +--
 kernel/crash_core.c                            | 29 ++++++-----
 kernel/events/uprobes.c                        |  3 +-
 kernel/exit.c                                  |  2 +
 kernel/hung_task.c                             | 13 +++--
 kernel/kprobes.c                               | 20 +++++---
 kernel/module.c                                | 59 +++++++++++------------
 kernel/panic.c                                 |  3 ++
 kernel/params.c                                | 13 +++--
 kernel/pid.c                                   |  2 +
 kernel/printk/printk.c                         |  2 +-
 kernel/profile.c                               |  2 +
 kernel/range.c                                 |  2 +-
 kernel/rcu/rcu_segcblist.c                     |  2 +
 kernel/rcu/rcuperf.c                           | 10 ++--
 kernel/rcu/rcutorture.c                        | 46 +++++++++---------
 kernel/rcu/srcutiny.c                          |  2 +
 kernel/rcu/srcutree.c                          |  5 +-
 kernel/rcu/tiny.c                              |  3 ++
 kernel/rcu/tree.c                              |  8 +--
 kernel/rcu/tree_plugin.h                       | 67 +++++++++++++++-----------
 kernel/rcu/update.c                            | 19 +++++---
 kernel/relay.c                                 |  5 +-
 kernel/seccomp.c                               |  4 +-
 kernel/signal.c                                | 10 ++--
 kernel/smpboot.c                               |  5 +-
 kernel/taskstats.c                             |  4 +-
 kernel/torture.c                               |  6 ++-
 kernel/tracepoint.c                            |  3 ++
 kernel/workqueue.c                             |  2 +
 lib/cpu_rmap.c                                 | 15 +++---
 lib/crc32test.c                                |  2 +
 lib/earlycpio.c                                |  5 +-
 lib/find_bit_benchmark.c                       |  2 +
 lib/kobject.c                                  | 36 +++++++-------
 lib/kobject_uevent.c                           | 27 +++++------
 lib/mpi/mpicoder.c                             | 10 ++--
 lib/nmi_backtrace.c                            |  3 ++
 lib/percpu_ida.c                               |  4 +-
 lib/percpu_test.c                              |  2 +
 lib/random32.c                                 | 10 ++--
 lib/stmp_device.c                              |  2 +
 lib/string.c                                   |  2 +
 lib/swiotlb.c                                  |  4 +-
 lib/test_debug_virtual.c                       |  2 +
 lib/test_rhashtable.c                          | 44 +++++++++--------
 lib/test_sort.c                                |  2 +
 lib/ubsan.c                                    | 61 ++++++++++++-----------
 net/ipv4/ipconfig.c                            | 59 ++++++++++-------------
 net/ipv4/ipmr.c                                |  2 +-
 net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c |  9 ++--
 net/ipv6/ip6mr.c                               |  2 +-
 net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c |  6 +--
 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c      |  4 +-
 net/netfilter/nf_conntrack_helper.c            | 11 ++---
 net/netfilter/nf_conntrack_standalone.c        |  2 +-
 net/socket.c                                   |  2 +-
 security/keys/encrypted-keys/encrypted.c       | 63 +++++++++++-------------
 security/selinux/selinuxfs.c                   | 29 ++++++-----
 82 files changed, 580 insertions(+), 532 deletions(-)
 rename arch/x86/kernel/cpu/mtrr/{main.c => mtrr.c} (96%)

-- 
2.15.0

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

end of thread, other threads:[~2019-02-21  6:25 UTC | newest]

Thread overview: 70+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-10 15:45 [PATCH 00/18] Convert default pr_fmt from empty to KBUILD_MODNAME Joe Perches
2018-05-10 15:45 ` [PATCH 01/18] kernel: Use pr_fmt Joe Perches
2018-05-10 16:14   ` Paul Moore
2018-05-10 19:05   ` Kees Cook
2018-05-13 19:17   ` Jessica Yu
2018-05-14 13:38   ` Masami Hiramatsu
2018-05-14 18:06   ` Paul E. McKenney
2018-05-14 18:59   ` Paul Moore
2018-05-10 15:45 ` [PATCH 02/18] lib: " Joe Perches
2018-05-10 15:45 ` [PATCH 03/18] printk: Convert pr_fmt from blank define to KBUILD_MODNAME Joe Perches
2018-05-10 16:28   ` Steven Rostedt
2018-05-11 21:39     ` [PATCH] ring_buffer: Update logging to use single line output Joe Perches
2018-07-12  2:57       ` Steven Rostedt
2018-07-12  4:42         ` Joe Perches
2018-07-12 13:00           ` Steven Rostedt
2018-05-11  1:51   ` [PATCH 03/18] printk: Convert pr_fmt from blank define to KBUILD_MODNAME Sergey Senozhatsky
2018-05-11  1:57     ` Joe Perches
2018-05-11  2:12       ` Joe Perches
2018-05-11  2:24       ` Sergey Senozhatsky
2018-05-11  2:23     ` Sergey Senozhatsky
2018-05-11  2:33       ` Joe Perches
2018-05-11  2:41         ` Sergey Senozhatsky
2018-05-11  2:57           ` Joe Perches
2018-05-18  8:42   ` Petr Mladek
2018-05-18  9:10     ` Joe Perches
2018-05-18 20:29       ` Andy Shevchenko
2018-05-19  2:05         ` Joe Perches
2018-05-19 18:27           ` Andy Shevchenko
2018-05-10 15:45 ` [PATCH 04/18] x86: Remove pr_fmt duplicate logging prefixes Joe Perches
2018-05-13 19:27   ` [tip:x86/cleanups] " tip-bot for Joe Perches
2018-05-17 18:27     ` Borislav Petkov
2018-05-17 18:43       ` Joe Perches
2018-05-17 19:14         ` Thomas Gleixner
2019-02-21  6:25         ` Bjorn Helgaas
2018-05-10 15:45 ` [PATCH 05/18] x86/mtrr: Rename main.c to mtrr.c and remove duplicate prefixes Joe Perches
2018-05-13 19:28   ` [tip:x86/cleanups] " tip-bot for Joe Perches
2018-05-10 15:45 ` [PATCH 06/18] net: Remove pr_fmt duplicate logging prefixes Joe Perches
2018-05-10 15:45 ` [PATCH 07/18] blk-mq: " Joe Perches
2018-05-10 15:45 ` [PATCH 08/18] random: " Joe Perches
2018-05-10 15:45 ` [PATCH 09/18] ptp: " Joe Perches
2018-05-10 19:35   ` Richard Cochran
2018-05-10 15:45 ` [PATCH 10/18] efifb: " Joe Perches
2018-05-10 15:45 ` [PATCH 11/18] proc: " Joe Perches
2018-05-10 15:45 ` [PATCH 12/18] uprobes: " Joe Perches
2018-05-10 15:45 ` [PATCH 13/18] printk: " Joe Perches
2018-05-11  1:54   ` Sergey Senozhatsky
2018-05-18  8:43   ` Petr Mladek
2018-05-10 15:45 ` [PATCH 14/18] lib/mpi: " Joe Perches
2018-05-10 15:45 ` [PATCH 15/18] security: " Joe Perches
2018-05-10 16:15   ` Paul Moore
2018-05-10 15:45 ` [PATCH 16/18] aoe: " Joe Perches
2018-05-10 15:45 ` [PATCH 17/18] security: encrypted-keys: " Joe Perches
2018-05-10 18:09   ` James Morris
2018-05-10 15:45 ` [PATCH 18/18] rcu: Use pr_fmt to prefix "rcu: " to logging output Joe Perches
2018-05-14 20:29   ` Paul E. McKenney
2018-05-14 20:37     ` Andy Shevchenko
2018-05-14 21:08       ` Paul E. McKenney
2018-05-14 20:52     ` Randy Dunlap
2018-05-14 21:05       ` Paul E. McKenney
2018-05-14 21:41     ` Joe Perches
2018-05-14 22:24       ` Paul E. McKenney
2018-05-14 22:54         ` Joe Perches
2018-05-14 23:58           ` Paul E. McKenney
2018-05-15  0:23             ` Joe Perches
2018-05-15  0:32               ` Paul E. McKenney
2018-05-15  1:22                 ` Joe Perches
2018-05-15  3:41                   ` Paul E. McKenney
2018-05-15 19:28                 ` Paul E. McKenney
2018-05-15 21:11                   ` Joe Perches
2018-05-15 21:23                     ` Paul E. McKenney

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).