The patch titled dynamic_debug.h/kernel.h: Remove KBUILD_MODNAME from dynamic_pr_debug has been added to the -mm tree. Its filename is dynamic_debugh-kernelh-remove-kbuild_modname-from-dynamic_pr_debug.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: dynamic_debug.h/kernel.h: Remove KBUILD_MODNAME from dynamic_pr_debug From: Joe Perches <joe@xxxxxxxxxxx> If CONFIG_DYNAMIC_DEBUG is enabled and a source file has: #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include <linux/kernel.h> dynamic_debug.h will duplicate KBUILD_MODNAME in the output string. Remove the use of KBUILD_MODNAME from the output format string generated by dynamic_debug.h If CONFIG_DYNAMIC_DEBUG is not enabled, no compile-time check is done to printk/dev_printk arguments. Add it. Signed-off-by: Joe Perches <joe@xxxxxxxxxxx> Cc: Jason Baron <jbaron@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- diff -puN include/linux/dynamic_debug.h~dynamic_debugh-kernelh-remove-kbuild_modname-from-dynamic_pr_debug include/linux/dynamic_debug.h --- a/include/linux/dynamic_debug.h~dynamic_debugh-kernelh-remove-kbuild_modname-from-dynamic_pr_debug +++ a/include/linux/dynamic_debug.h @@ -57,8 +57,7 @@ extern int ddebug_remove_module(char *mo { KBUILD_MODNAME, __func__, __FILE__, fmt, DEBUG_HASH, \ DEBUG_HASH2, __LINE__, _DPRINTK_FLAGS_DEFAULT }; \ if (__dynamic_dbg_enabled(descriptor)) \ - printk(KERN_DEBUG KBUILD_MODNAME ":" pr_fmt(fmt), \ - ##__VA_ARGS__); \ + printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \ } while (0) @@ -69,9 +68,7 @@ extern int ddebug_remove_module(char *mo { KBUILD_MODNAME, __func__, __FILE__, fmt, DEBUG_HASH, \ DEBUG_HASH2, __LINE__, _DPRINTK_FLAGS_DEFAULT }; \ if (__dynamic_dbg_enabled(descriptor)) \ - dev_printk(KERN_DEBUG, dev, \ - KBUILD_MODNAME ": " fmt, \ - ##__VA_ARGS__); \ + dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \ } while (0) #else @@ -81,8 +78,10 @@ static inline int ddebug_remove_module(c return 0; } -#define dynamic_pr_debug(fmt, ...) do { } while (0) -#define dynamic_dev_dbg(dev, format, ...) do { } while (0) +#define dynamic_pr_debug(fmt, ...) \ + do { if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); } while (0) +#define dynamic_dev_dbg(dev, format, ...) \ + do { if (0) dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); } while (0) #endif #endif diff -puN include/linux/kernel.h~dynamic_debugh-kernelh-remove-kbuild_modname-from-dynamic_pr_debug include/linux/kernel.h --- a/include/linux/kernel.h~dynamic_debugh-kernelh-remove-kbuild_modname-from-dynamic_pr_debug +++ a/include/linux/kernel.h @@ -396,9 +396,8 @@ static inline char *pack_hex_byte(char * printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) #elif defined(CONFIG_DYNAMIC_DEBUG) /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ -#define pr_debug(fmt, ...) do { \ - dynamic_pr_debug(fmt, ##__VA_ARGS__); \ - } while (0) +#define pr_debug(fmt, ...) \ + dynamic_pr_debug(fmt, ##__VA_ARGS__) #else #define pr_debug(fmt, ...) \ ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) _ Patches currently in -mm which might be from joe@xxxxxxxxxxx are linux-next.patch dynamic_debugh-kernelh-remove-kbuild_modname-from-dynamic_pr_debug.patch maintainers-update-generic-uio-for-pci-devices.patch maintainers-update-tracing-section.patch maintainers-update-omap-tony-lindgren-email-name.patch maintainers-change-atm-mailing-list-to-moderated.patch maintainers-use-tab-not-spaces-after-field-types.patch maintainers-update-kernel-janitors-after-mismerge.patch maintainers-update-score-architecture-name-style-and-add-file-pattern.patch maintainers-simple-firmware-interface-update-email-style.patch maintainers-winbond-cir-integrate-p-m-lines-fixup-david-härdemans-name.patch maintainers-fix-up-peripheral-spelling.patch maintainers-update-wolfson-microelectronics.patch isicomc-use-pr_fmt-and-pr_level.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html