[intel-tdx:guest 62/136] arch/x86/kernel/tdx.c:225:5: warning: no previous prototype for function 'tdx_hcall_set_notify_intr'

kernel test robot
2023-12-16T18:16:43Z

tree: https://github.com/intel/tdx.git guest
head: f3d7a7e86bf2f0d5ce629f2fb7be11dca88ac06d
commit: 2c0498d3a27b537d428cc081fe9578605111569e [62/136] x86/tdx: Add SetupEventNotifyInterrupt TDX hypercall support
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20231217/202312170253.LKpNFmoD-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231217/202312170253.LKpNFmoD-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312170253.LKpNFmoD-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> arch/x86/kernel/tdx.c:225:5: warning: no previous prototype for function 'tdx_hcall_set_notify_intr' [-Wmissing-prototypes]
int tdx_hcall_set_notify_intr(u8 vector)
^
arch/x86/kernel/tdx.c:225:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tdx_hcall_set_notify_intr(u8 vector)
^
static
1 warning generated.

vim +/tdx_hcall_set_notify_intr +225 arch/x86/kernel/tdx.c

217
218 /*
219 * tdx_hcall_set_notify_intr() - Setup Event Notify Interrupt Vector.
220 *
221 * @vector : Vector address to be used for notification.
222 *
223 * return 0 on success or failure error number.
224 */
> 225 int tdx_hcall_set_notify_intr(u8 vector)
226 {
227 u64 ret;
228
229 /* Minimum vector value allowed is 32 */
230 if (vector < 32)
231 return -EINVAL;
232
233 /*
234 * Register callback vector address with VMM. More details
235 * about the ABI can be found in TDX Guest-Host-Communication
236 * Interface (GHCI), sec 3.5.
237 */
238 ret = _trace_tdx_hypercall(TDVMCALL_SETUP_NOTIFY_INTR, vector, 0, 0, 0,
239 NULL);
240
241 if (ret == TDVMCALL_SUCCESS)
242 return 0;
243 else if (ret == TDCALL_INVALID_OPERAND)
244 return -EINVAL;
245
246 return -EIO;
247 }
248

--
0-DAY CI Kernel Test Service