[intel-tdx:guest-hardening-rebased 11/39] arch/x86/coco/tdx/tdx.c:298:14: warning: no previous prototype for function 'tdx_write_msr'

From: kernel test robot
Date: Mon Sep 12 2022 - 22:04:47 EST


Hi Andi,

FYI, the error/warning still remains.

tree: https://github.com/intel/tdx.git guest-hardening-rebased
head: 1f71e25a309e1f46dadb7c65e4383c3690dcd3be
commit: a9189da9f0413f85d9072894ccb973cf785d2c0d [11/39] x86/tdx: Use direct paravirt call for wrmsrl
config: x86_64-randconfig-r025-20220912 (https://download.01.org/0day-ci/archive/20220913/202209131039.Nv0agYnN-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
# https://github.com/intel/tdx/commit/a9189da9f0413f85d9072894ccb973cf785d2c0d
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx guest-hardening-rebased
git checkout a9189da9f0413f85d9072894ccb973cf785d2c0d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/coco/tdx/

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

All warnings (new ones prefixed by >>):

>> arch/x86/coco/tdx/tdx.c:298:14: warning: no previous prototype for function 'tdx_write_msr' [-Wmissing-prototypes]
void notrace tdx_write_msr(unsigned int msr, u32 low, u32 high)
^
arch/x86/coco/tdx/tdx.c:298:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void notrace tdx_write_msr(unsigned int msr, u32 low, u32 high)
^
static
1 warning generated.


vim +/tdx_write_msr +298 arch/x86/coco/tdx/tdx.c

297
> 298 void notrace tdx_write_msr(unsigned int msr, u32 low, u32 high)
299 {
300 struct tdx_hypercall_args args = {
301 .r10 = TDX_HYPERCALL_STANDARD,
302 .r11 = hcall_func(EXIT_REASON_MSR_WRITE),
303 .r12 = msr,
304 .r13 = (u64)high << 32 | low,
305 };
306
307 if (tdx_fast_tdcall_path_msr(msr))
308 __tdx_hypercall(&args, 0);
309 else
310 native_write_msr(msr, low, high);
311 }
312

--
0-DAY CI Kernel Test Service
https://01.org/lkp