[linux-next:master 8078/10638] arch/mips/kernel/uprobes.c:176:2: warning: unannotated fall-through between switch labels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   88fac11862d38306dd0d2398015744877140390d
commit: 7bc04ce6b914a06d5823509d1de237787c58e649 [8078/10638] Makefile: Enable -Wimplicit-fallthrough for Clang
config: mips-randconfig-c004-20210827 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 1076082a0d97bd5c16a25ee7cf3dbb6ee4b5a9fe)
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 mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=7bc04ce6b914a06d5823509d1de237787c58e649
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 7bc04ce6b914a06d5823509d1de237787c58e649
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips 

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

All warnings (new ones prefixed by >>):

>> arch/mips/kernel/uprobes.c:176:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           default:
           ^
   arch/mips/kernel/uprobes.c:176:2: note: insert 'break;' to avoid fall-through
           default:
           ^
           break; 
   1 warning generated.


vim +176 arch/mips/kernel/uprobes.c

40e084a506eba7 Ralf Baechle      2015-07-29  153  
40e084a506eba7 Ralf Baechle      2015-07-29  154  int arch_uprobe_exception_notify(struct notifier_block *self,
40e084a506eba7 Ralf Baechle      2015-07-29  155  	unsigned long val, void *data)
40e084a506eba7 Ralf Baechle      2015-07-29  156  {
40e084a506eba7 Ralf Baechle      2015-07-29  157  	struct die_args *args = data;
40e084a506eba7 Ralf Baechle      2015-07-29  158  	struct pt_regs *regs = args->regs;
40e084a506eba7 Ralf Baechle      2015-07-29  159  
40e084a506eba7 Ralf Baechle      2015-07-29  160  	/* regs == NULL is a kernel bug */
40e084a506eba7 Ralf Baechle      2015-07-29  161  	if (WARN_ON(!regs))
40e084a506eba7 Ralf Baechle      2015-07-29  162  		return NOTIFY_DONE;
40e084a506eba7 Ralf Baechle      2015-07-29  163  
40e084a506eba7 Ralf Baechle      2015-07-29  164  	/* We are only interested in userspace traps */
40e084a506eba7 Ralf Baechle      2015-07-29  165  	if (!user_mode(regs))
40e084a506eba7 Ralf Baechle      2015-07-29  166  		return NOTIFY_DONE;
40e084a506eba7 Ralf Baechle      2015-07-29  167  
40e084a506eba7 Ralf Baechle      2015-07-29  168  	switch (val) {
2809328f6ef213 Marcin Nowakowski 2016-08-11  169  	case DIE_UPROBE:
40e084a506eba7 Ralf Baechle      2015-07-29  170  		if (uprobe_pre_sstep_notifier(regs))
40e084a506eba7 Ralf Baechle      2015-07-29  171  			return NOTIFY_STOP;
40e084a506eba7 Ralf Baechle      2015-07-29  172  		break;
40e084a506eba7 Ralf Baechle      2015-07-29  173  	case DIE_UPROBE_XOL:
40e084a506eba7 Ralf Baechle      2015-07-29  174  		if (uprobe_post_sstep_notifier(regs))
40e084a506eba7 Ralf Baechle      2015-07-29  175  			return NOTIFY_STOP;
40e084a506eba7 Ralf Baechle      2015-07-29 @176  	default:
40e084a506eba7 Ralf Baechle      2015-07-29  177  		break;
40e084a506eba7 Ralf Baechle      2015-07-29  178  	}
40e084a506eba7 Ralf Baechle      2015-07-29  179  
40e084a506eba7 Ralf Baechle      2015-07-29  180  	return 0;
40e084a506eba7 Ralf Baechle      2015-07-29  181  }
40e084a506eba7 Ralf Baechle      2015-07-29  182  

:::::: The code at line 176 was first introduced by commit
:::::: 40e084a506eba78310cd5e8ab700fd1226c6130a MIPS: Add uprobes support.

:::::: TO: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
:::::: CC: Ralf Baechle <ralf@xxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux