drivers/gpu/drm/i915/gvt/gtt.c:263:19: error: unused function 'get_pt_type'

From: kernel test robot
Date: Sun Aug 16 2020 - 19:40:08 EST


Hi Masahiro,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
commit: 6863f5643dd717376c2fdc85a47a00f9d738a834 kbuild: allow Clang to find unused static inline functions for W=1 build
date: 11 months ago
config: x86_64-randconfig-r013-20200817 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ab9fc8bae805c785066779e76e7846aabad5609e)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 6863f5643dd717376c2fdc85a47a00f9d738a834
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/i915/gvt/gtt.c:263:19: error: unused function 'get_pt_type' [-Werror,-Wunused-function]
static inline int get_pt_type(int type)
^
>> drivers/gpu/drm/i915/gvt/gtt.c:587:20: error: unused function 'ppgtt_set_guest_root_entry' [-Werror,-Wunused-function]
static inline void ppgtt_set_guest_root_entry(struct intel_vgpu_mm *mm,
^
2 errors generated.

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6863f5643dd717376c2fdc85a47a00f9d738a834
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6863f5643dd717376c2fdc85a47a00f9d738a834
vim +/get_pt_type +263 drivers/gpu/drm/i915/gvt/gtt.c

2707e44466881d Zhi Wang 2016-03-28 262
054f4eba2a2985 Zhi Wang 2017-10-10 @263 static inline int get_pt_type(int type)
054f4eba2a2985 Zhi Wang 2017-10-10 264 {
054f4eba2a2985 Zhi Wang 2017-10-10 265 return gtt_type_table[type].pt_type;
054f4eba2a2985 Zhi Wang 2017-10-10 266 }
054f4eba2a2985 Zhi Wang 2017-10-10 267

:::::: The code at line 263 was first introduced by commit
:::::: 054f4eba2a2985b1db43353b7b5ce90e96cf9bb9 drm/i915/gvt: Introduce page table type of current level in GTT type enumerations

:::::: TO: Zhi Wang <zhi.a.wang@xxxxxxxxx>
:::::: CC: Zhenyu Wang <zhenyuw@xxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip