public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: [ardb:efi-psci 2/2] drivers/firmware/psci/psci.c:152:2: warning: unannotated fall-through between switch labels
Date: Mon, 21 Mar 2022 01:03:24 +0800	[thread overview]
Message-ID: <202203210042.UJZ5llHd-lkp@intel.com> (raw)

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git efi-psci
head:   4b8d4b95fbd43459a4b0ae3f9020a912f7621884
commit: 4b8d4b95fbd43459a4b0ae3f9020a912f7621884 [2/2] efi: arm: implement PSCI method backed by EFI runtime code
config: arm64-randconfig-r022-20220320 (https://download.01.org/0day-ci/archive/20220321/202203210042.UJZ5llHd-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 85e9b2687a13d1908aa86d1b89c5ce398a06cd39)
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 arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?id=4b8d4b95fbd43459a4b0ae3f9020a912f7621884
        git remote add ardb git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
        git fetch --no-tags ardb efi-psci
        git checkout 4b8d4b95fbd43459a4b0ae3f9020a912f7621884
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/firmware/psci/

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 >>):

>> drivers/firmware/psci/psci.c:152:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           default:
           ^
   drivers/firmware/psci/psci.c:152:2: note: insert '__attribute__((fallthrough));' to silence this warning
           default:
           ^
           __attribute__((fallthrough)); 
   drivers/firmware/psci/psci.c:152:2: note: insert 'break;' to avoid fall-through
           default:
           ^
           break; 
   drivers/firmware/psci/psci.c:94:20: warning: unused function 'psci_power_state_loses_context' [-Wunused-function]
   static inline bool psci_power_state_loses_context(u32 state)
                      ^
   2 warnings generated.


vim +152 drivers/firmware/psci/psci.c

   131	
   132	static unsigned long __invoke_psci_fn_efi(unsigned long function_id,
   133				unsigned long arg0, unsigned long arg1,
   134				unsigned long arg2)
   135	{
   136		unsigned long flags, ret;
   137	
   138		switch (function_id) {
   139		case PSCI_0_2_FN_PSCI_VERSION:
   140			return PSCI_VERSION(0, 2);
   141		case PSCI_0_2_FN_MIGRATE_INFO_TYPE:
   142			return PSCI_0_2_TOS_MP;
   143		case PSCI_0_2_FN_CPU_SUSPEND:
   144		case PSCI_0_2_FN_CPU_OFF:
   145		case PSCI_0_2_FN_CPU_ON:
   146		case PSCI_0_2_FN_AFFINITY_INFO:
   147		case PSCI_0_2_FN64_CPU_SUSPEND:
   148		case PSCI_0_2_FN64_CPU_ON:
   149		case PSCI_0_2_FN64_AFFINITY_INFO:
   150			if (WARN_ON_ONCE(!efi_psci.psci_handler ||
   151					 !efi_enabled(EFI_RUNTIME_SERVICES)))
 > 152		default:
   153				return PSCI_RET_NOT_SUPPORTED;
   154			break;
   155		}
   156	
   157		raw_local_irq_save(flags);
   158		efi_set_pgd(&efi_mm);
   159	
   160		ret = efi_psci.psci_handler(function_id, arg0, arg1, arg2);
   161	
   162		efi_set_pgd(current->active_mm);
   163		raw_local_irq_restore(flags);
   164	
   165		return ret;
   166	}
   167	

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

                 reply	other threads:[~2022-03-20 17:03 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=202203210042.UJZ5llHd-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ardb@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    /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