mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [intel-tdx:guest-upstream 21/28] arch/x86/kernel/tdx.c:102:7: warning: this statement may fall through
@ 2021-12-01 10:21 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-12-01 10:21 UTC (permalink / raw)
  To: Kirill A. Shutemov
  Cc: kbuild-all, linux-kernel, Kuppuswamy Sathyanarayanan, Andi Kleen,
	Tony Luck

tree:   https://github.com/intel/tdx.git guest-upstream
head:   e6dbebc1d0c8a4a2449cd0800c025fb25078a6ac
commit: 466e3f43adbeeab45d4e4213a078c823edf35fc8 [21/28] x86/tdx: Add helper to convert memory between shared and private
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20211201/202112011845.7xW5IRjl-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel/tdx/commit/466e3f43adbeeab45d4e4213a078c823edf35fc8
        git remote add intel-tdx https://github.com/intel/tdx.git
        git fetch --no-tags intel-tdx guest-upstream
        git checkout 466e3f43adbeeab45d4e4213a078c823edf35fc8
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/

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

All warnings (new ones prefixed by >>):

   arch/x86/kernel/tdx.c:296:8: error: return type defaults to 'int' [-Werror=return-type]
     296 | static tdx_mmio_write(int size, unsigned long addr, unsigned long *val)
         |        ^~~~~~~~~~~~~~
   arch/x86/kernel/tdx.c: In function 'tdx_accept_page':
>> arch/x86/kernel/tdx.c:102:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
     102 |   gpa |= 1;
         |   ~~~~^~~~
   arch/x86/kernel/tdx.c:103:2: note: here
     103 |  case PG_LEVEL_1G:
         |  ^~~~
   arch/x86/kernel/tdx.c:104:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
     104 |   gpa |= 2;
         |   ~~~~^~~~
   arch/x86/kernel/tdx.c:105:2: note: here
     105 |  default:
         |  ^~~~~~~
   cc1: some warnings being treated as errors


vim +102 arch/x86/kernel/tdx.c

    89	
    90	static bool tdx_accept_page(phys_addr_t gpa, enum pg_level pg_level)
    91	{
    92		/*
    93		 * Pass the page physical address to the TDX module to accept the
    94		 * pending, private page.
    95		 *
    96		 * Bits 2:0 if GPA encodes page size: 0 - 4K, 1 - 2M.
    97		 */
    98		switch (pg_level) {
    99		case PG_LEVEL_4K:
   100			break;
   101		case PG_LEVEL_2M:
 > 102			gpa |= 1;
   103		case PG_LEVEL_1G:
   104			gpa |= 2;
   105		default:
   106			return true;
   107		}
   108	
   109		return __tdx_module_call(TDX_ACCEPT_PAGE, gpa, 0, 0, 0, NULL);
   110	}
   111	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-01 10:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-01 10:21 [intel-tdx:guest-upstream 21/28] arch/x86/kernel/tdx.c:102:7: warning: this statement may fall through kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®