Whamcloud - gitweb
LU-13783 libcfs: add cfs_kallsyms_lookup_name() 96/43296/3
authorJian Yu <yujian@whamcloud.com>
Tue, 13 Apr 2021 05:12:27 +0000 (22:12 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 28 Apr 2021 02:11:20 +0000 (02:11 +0000)
commit783002035ae9612b5b0aa80f2342a2ee9e81c374
treeb9460a4c76d4646f7db626b32673e8c44eef6477
parent958989085a54d1f2bb9e4831e7495eae4c165b8e
LU-13783 libcfs: add cfs_kallsyms_lookup_name()

The inline kallsyms_lookup_name() added by
commit d7249d9d70a caused the following failures:

libcfs/include/libcfs/linux/linux-misc.h:150:21:
error: conflicting types for ‘kallsyms_lookup_name’
  150 | static inline void *kallsyms_lookup_name(char *func)
      |                     ^~~~~~~~~~~~~~~~~~~~

include/linux/kallsyms.h:76:15:
note: previous declaration of ‘kallsyms_lookup_name’ was here
   76 | unsigned long kallsyms_lookup_name(const char *name);
      |               ^~~~~~~~~~~~~~~~~~~~

This patch removes the inline kallsyms_lookup_name() definition
from linux-misc.h and adds cfs_kallsyms_lookup_name() to wrap
kallsyms_lookup_name() if it is exported or return NULL in case of
kallsyms_lookup_name() is not exported.

Fixes: d7249d9d70a ("LU-13783 libcfs: provide fallback kallsyms_lookup_name()")
Change-Id: I4b2d4499948a8586b48db68484491ec76c3a609d
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/43296
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/include/libcfs/linux/linux-misc.h
libcfs/libcfs/debug.c
libcfs/libcfs/linux/linux-prim.c
lustre/llite/vvp_dev.c
lustre/llite/vvp_io.c
lustre/osd-ldiskfs/osd_handler.c