[PATCH] introduce compiletime loglevel

Sascha Hauer s.hauer at pengutronix.de
Tue Jan 29 03:45:35 EST 2013


This makes the loglevel configurable at compile time. This allows
to optimize away the lesser important messages from the binary.

Also added is a pr_fmt macro as in the kernel which allows to
define a file specific prefix to the pr_* messages.

As a positive side effect pr_debug() and debug() is no longer
optimized away by the preprocessor but by gcc. This way we have
nice warnings for all the wrong debug calls in the code, so this
series also cleans them up and it makes it harder to introduce
new wrong debug calls.

Sascha

----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (1):
      consolidate print* in a single header

Sascha Hauer (11):
      mtd m25p80: consistenly switch to dev_* messages
      treewide: fix format specifiers
      nios2: Let readl return an unsigned int
      nios2: Use unsigned long for __kernel_size_t
      blackfin: Use unsigned long for __kernel_size_t
      USB ehci: Use dev_* for messages
      introduce compile time loglevel
      introduce pr_fmt
      ARM mmu: Use pr_debug
      ARM pcm038: Specify pr_fmt and change messages to pr_*
      mtd nand: Specify pr_fmt and change messages to pr_*

 arch/arm/boards/pcm038/pcm038.c         |    5 ++-
 arch/arm/cpu/mmu.c                      |   27 ++++++++++--
 arch/arm/mach-imx/esdctl.c              |    4 +-
 arch/arm/mach-omap/gpmc.c               |    6 +--
 arch/blackfin/include/asm/posix_types.h |    2 +-
 arch/nios2/include/asm/io.h             |    2 +-
 arch/nios2/include/asm/posix_types.h    |    2 +-
 arch/ppc/lib/board.c                    |    4 +-
 common/Kconfig                          |   16 +++++++
 common/environment.c                    |   10 +++--
 common/hush.c                           |    4 +-
 common/module.c                         |    2 +-
 common/parser.c                         |    4 +-
 common/resource.c                       |   26 ++++++++---
 common/uimage.c                         |    5 ++-
 drivers/mci/mxs.c                       |    2 +-
 drivers/mtd/devices/m25p80.c            |   11 ++---
 drivers/mtd/nand/nand_base.c            |   39 +++++++++--------
 drivers/mtd/nand/nand_bbt.c             |   43 +++++++++---------
 drivers/mtd/nand/nand_write.c           |    4 +-
 drivers/nor/cfi_flash.c                 |   14 +++---
 drivers/nor/cfi_flash.h                 |    4 ++
 drivers/usb/host/ehci-hcd.c             |   73 +++++++++++++++++--------------
 fs/tftp.c                               |    4 +-
 include/common.h                        |   17 +------
 include/driver.h                        |   29 ------------
 include/linux/mtd/mtd.h                 |    2 +-
 include/printk.h                        |   72 ++++++++++++++++++++++++++++++
 lib/gui/bmp.c                           |    2 +-
 lib/xfuncs.c                            |    4 +-
 30 files changed, 269 insertions(+), 170 deletions(-)
 create mode 100644 include/printk.h



More information about the barebox mailing list