aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-10-16 01:01:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 14:21:31 -0400
commitc80cfb0406c01bb5da91bfe30f5cb1fd96831138 (patch)
tree9f9d382c30457f8553bcd3e4ae5cc03dc2dc120b
parent404d0ae289f7a76ff233e8fbfde8b1e7b6e62ae3 (diff)
vsprintf: use new vsprintf symbolic function pointer format
Use the '%pF' format to get rid of an "#ifdef DEBUG" and make some printks atomic. This removes the last in-tree uses of print_fn_descriptor_symbol(). I marked print_fn_descriptor_symbol() deprecated and scheduled it for removal next year to give time for out-of-tree modules to be updated. parisc's print_fn_descriptor_symbol() is currently broken there (it needs to dereference the function pointer similar to ia64 and power). This patch shouldn't make anything worse, but it means we need to fix dereference_function_descriptor() instead of print_fn_descriptor_symbol() to get meaningful initcall_debug output. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--Documentation/feature-removal-schedule.txt9
-rw-r--r--drivers/base/power/main.c7
-rw-r--r--include/linux/kallsyms.h8
3 files changed, 14 insertions, 10 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 4d2566a7d168..f5f812daf9f4 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -294,6 +294,15 @@ Who: Jiri Slaby <jirislaby@gmail.com>
294 294
295--------------------------- 295---------------------------
296 296
297What: print_fn_descriptor_symbol()
298When: October 2009
299Why: The %pF vsprintf format provides the same functionality in a
300 simpler way. print_fn_descriptor_symbol() is deprecated but
301 still present to give out-of-tree modules time to change.
302Who: Bjorn Helgaas <bjorn.helgaas@hp.com>
303
304---------------------------
305
297What: /sys/o2cb symlink 306What: /sys/o2cb symlink
298When: January 2010 307When: January 2010
299Why: /sys/fs/o2cb is the proper location for this information - /sys/o2cb 308Why: /sys/fs/o2cb is the proper location for this information - /sys/o2cb
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 273a944d4040..03bde7524bc3 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -778,10 +778,7 @@ EXPORT_SYMBOL_GPL(device_suspend);
778 778
779void __suspend_report_result(const char *function, void *fn, int ret) 779void __suspend_report_result(const char *function, void *fn, int ret)
780{ 780{
781 if (ret) { 781 if (ret)
782 printk(KERN_ERR "%s(): ", function); 782 printk(KERN_ERR "%s(): %pF returns %d\n", function, fn, ret);
783 print_fn_descriptor_symbol("%s returns ", fn);
784 printk("%d\n", ret);
785 }
786} 783}
787EXPORT_SYMBOL_GPL(__suspend_report_result); 784EXPORT_SYMBOL_GPL(__suspend_report_result);
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
index b96144887444..f3fe34391d8e 100644
--- a/include/linux/kallsyms.h
+++ b/include/linux/kallsyms.h
@@ -93,12 +93,10 @@ static inline void print_symbol(const char *fmt, unsigned long addr)
93} 93}
94 94
95/* 95/*
96 * Pretty-print a function pointer. 96 * Pretty-print a function pointer. This function is deprecated.
97 * 97 * Please use the "%pF" vsprintf format instead.
98 * ia64 and ppc64 function pointers are really function descriptors,
99 * which contain a pointer the real address.
100 */ 98 */
101static inline void print_fn_descriptor_symbol(const char *fmt, void *addr) 99static inline void __deprecated print_fn_descriptor_symbol(const char *fmt, void *addr)
102{ 100{
103#if defined(CONFIG_IA64) || defined(CONFIG_PPC64) 101#if defined(CONFIG_IA64) || defined(CONFIG_PPC64)
104 addr = *(void **)addr; 102 addr = *(void **)addr;