kallsyms: remove print_symbol() function
No more print_symbol()/__print_symbol() users left, remove these symbols. It was a very old API that encouraged people use continuous lines. It had been obsoleted by %pS format specifier in a normal printk() call. Link: http://lkml.kernel.org/r/20180105102538.GC471@jagdpanzerIV Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Russell King <linux@armlinux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Mark Salter <msalter@redhat.com> Cc: Tony Luck <tony.luck@intel.com> Cc: David Howells <dhowells@redhat.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Borislav Petkov <bp@alien8.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Fengguang Wu <fengguang.wu@intel.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: LKML <linux-kernel@vger.kernel.org> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linux-am33-list@redhat.com Cc: linux-sh@vger.kernel.org Cc: linux-edac@vger.kernel.org Cc: x86@kernel.org Cc: linux-snps-arc@lists.infradead.org Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Suggested-by: Joe Perches <joe@perches.com> [pmladek@suse.com: updated commit message] Signed-off-by: Petr Mladek <pmladek@suse.com>
This commit is contained in:
parent
d202d47b5e
commit
d2279c9d7f
|
@ -154,8 +154,8 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
|
|||
if (dev_attr->show)
|
||||
ret = dev_attr->show(dev, dev_attr, buf);
|
||||
if (ret >= (ssize_t)PAGE_SIZE) {
|
||||
print_symbol("dev_attr_show: %s returned bad count\n",
|
||||
(unsigned long)dev_attr->show);
|
||||
printk("dev_attr_show: %pS returned bad count\n",
|
||||
dev_attr->show);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -167,8 +167,8 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
|
|||
if (dev_attr->show)
|
||||
ret = dev_attr->show(dev, dev_attr, buf);
|
||||
if (ret >= (ssize_t)PAGE_SIZE) {
|
||||
print_symbol("dev_attr_show: %s returned bad count\n",
|
||||
(unsigned long)dev_attr->show);
|
||||
printk("dev_attr_show: %pS returned bad count\n",
|
||||
dev_attr->show);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -46,9 +46,6 @@ extern int sprint_symbol(char *buffer, unsigned long address);
|
|||
extern int sprint_symbol_no_offset(char *buffer, unsigned long address);
|
||||
extern int sprint_backtrace(char *buffer, unsigned long address);
|
||||
|
||||
/* Look up a kernel symbol and print it to the kernel messages. */
|
||||
extern void __print_symbol(const char *fmt, unsigned long address);
|
||||
|
||||
int lookup_symbol_name(unsigned long addr, char *symname);
|
||||
int lookup_symbol_attrs(unsigned long addr, unsigned long *size, unsigned long *offset, char *modname, char *name);
|
||||
|
||||
|
@ -118,23 +115,8 @@ static inline int kallsyms_show_value(void)
|
|||
return false;
|
||||
}
|
||||
|
||||
/* Stupid that this does nothing, but I didn't create this mess. */
|
||||
#define __print_symbol(fmt, addr)
|
||||
#endif /*CONFIG_KALLSYMS*/
|
||||
|
||||
/* This macro allows us to keep printk typechecking */
|
||||
static __printf(1, 2)
|
||||
void __check_printsym_format(const char *fmt, ...)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void print_symbol(const char *fmt, unsigned long addr)
|
||||
{
|
||||
__check_printsym_format(fmt, "");
|
||||
__print_symbol(fmt, (unsigned long)
|
||||
__builtin_extract_return_addr((void *)addr));
|
||||
}
|
||||
|
||||
static inline void print_ip_sym(unsigned long ip)
|
||||
{
|
||||
printk("[<%p>] %pS\n", (void *) ip, (void *) ip);
|
||||
|
|
|
@ -464,17 +464,6 @@ int sprint_backtrace(char *buffer, unsigned long address)
|
|||
return __sprint_symbol(buffer, address, -1, 1);
|
||||
}
|
||||
|
||||
/* Look up a kernel symbol and print it to the kernel messages. */
|
||||
void __print_symbol(const char *fmt, unsigned long address)
|
||||
{
|
||||
char buffer[KSYM_SYMBOL_LEN];
|
||||
|
||||
sprint_symbol(buffer, address);
|
||||
|
||||
printk(fmt, buffer);
|
||||
}
|
||||
EXPORT_SYMBOL(__print_symbol);
|
||||
|
||||
/* To avoid using get_symbol_offset for every symbol, we carry prefix along. */
|
||||
struct kallsym_iter {
|
||||
loff_t pos;
|
||||
|
|
Loading…
Reference in New Issue