From a442ac512f36981182e66a427ad05f449ff6593b Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 15 May 2008 17:50:37 -0700 Subject: Clean up 'print_fn_descriptor_symbol()' types Everybody wants to pass it a function pointer, and in fact, that is what you _must_ pass it for it to make sense (since it knows that ia64 and ppc64 use descriptors for function pointers and fetches the actual address from there). So don't make the argument be a 'unsigned long' and force everybody to add a cast. Signed-off-by: Linus Torvalds --- drivers/base/power/main.c | 2 +- drivers/pci/quirks.c | 3 +-- drivers/pnp/quirks.c | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 7b76fd3b93a..45cc3d9eacb 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -418,7 +418,7 @@ void __suspend_report_result(const char *function, void *fn, int ret) { if (ret) { printk(KERN_ERR "%s(): ", function); - print_fn_descriptor_symbol("%s() returns ", (unsigned long)fn); + print_fn_descriptor_symbol("%s returns ", fn); printk("%d\n", ret); } } diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index f2d9c770f51..dabb563f51d 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -1503,8 +1503,7 @@ static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_f (f->device == dev->device || f->device == (u16) PCI_ANY_ID)) { #ifdef DEBUG dev_dbg(&dev->dev, "calling "); - print_fn_descriptor_symbol("%s()\n", - (unsigned long) f->hook); + print_fn_descriptor_symbol("%s\n", f->hook); #endif f->hook(dev); } diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c index ffdb12a59c4..e2b7de4cb05 100644 --- a/drivers/pnp/quirks.c +++ b/drivers/pnp/quirks.c @@ -331,8 +331,7 @@ void pnp_fixup_device(struct pnp_dev *dev) continue; #ifdef DEBUG dev_dbg(&dev->dev, "%s: calling ", f->id); - print_fn_descriptor_symbol("%s\n", - (unsigned long) f->quirk_function); + print_fn_descriptor_symbol("%s\n", f->quirk_function); #endif f->quirk_function(dev); } -- cgit v1.2.3