mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Kuppuswamy Sathyanarayanan 
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	Andi Kleen <ak@linux.intel.com>, Tony Luck <tony.luck@intel.com>
Subject: [intel-tdx:guest-upstream 21/28] arch/x86/kernel/tdx.c:102:7: warning: this statement may fall through
Date: Wed, 1 Dec 2021 18:21:31 +0800	[thread overview]
Message-ID: <202112011845.7xW5IRjl-lkp@intel.com> (raw)

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

                 reply	other threads:[~2021-12-01 10:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202112011845.7xW5IRjl-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ak@linux.intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®