arch/arm/mach-ep93xx/crunch.c:46:3: warning: this statement may fall through
From: kbuild test robot
Date: Wed Aug 07 2019 - 22:23:45 EST
Hi Gustavo,
FYI, the error/warning still remains.
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ecb095bff5d4b8711a81968625b3b4a235d3e477
commit: a035d552a93bb9ef6048733bb9f2a0dc857ff869 Makefile: Globally enable fall-through warning
date: 13 days ago
config: arm-ep93xx_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout a035d552a93bb9ef6048733bb9f2a0dc857ff869
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
arch/arm/mach-ep93xx/crunch.c: In function 'crunch_do':
>> arch/arm/mach-ep93xx/crunch.c:46:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
memset(crunch_state, 0, sizeof(*crunch_state));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-ep93xx/crunch.c:53:2: note: here
case THREAD_NOTIFY_EXIT:
^~~~
vim +46 arch/arm/mach-ep93xx/crunch.c
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 35
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 36 static int crunch_do(struct notifier_block *self, unsigned long cmd, void *t)
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 37 {
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 38 struct thread_info *thread = (struct thread_info *)t;
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 39 struct crunch_state *crunch_state;
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 40 u32 devcfg;
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 41
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 42 crunch_state = &thread->crunchstate;
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 43
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 44 switch (cmd) {
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 45 case THREAD_NOTIFY_FLUSH:
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 @46 memset(crunch_state, 0, sizeof(*crunch_state));
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 47
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 48 /*
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 49 * FALLTHROUGH: Ensure we don't try to overwrite our newly
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 50 * initialised state information on the first fault.
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 51 */
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 52
797245f5da5430 arch/arm/kernel/crunch.c Russell King 2009-12-18 53 case THREAD_NOTIFY_EXIT:
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 54 crunch_task_release(thread);
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 55 break;
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 56
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 57 case THREAD_NOTIFY_SWITCH:
02239f0a426460 arch/arm/kernel/crunch.c Hartley Sweeten 2009-07-08 58 devcfg = __raw_readl(EP93XX_SYSCON_DEVCFG);
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 59 if (crunch_enabled(devcfg) || crunch_owner == crunch_state) {
02239f0a426460 arch/arm/kernel/crunch.c Hartley Sweeten 2009-07-08 60 /*
02239f0a426460 arch/arm/kernel/crunch.c Hartley Sweeten 2009-07-08 61 * We don't use ep93xx_syscon_swlocked_write() here
02239f0a426460 arch/arm/kernel/crunch.c Hartley Sweeten 2009-07-08 62 * because we are on the context switch path and
02239f0a426460 arch/arm/kernel/crunch.c Hartley Sweeten 2009-07-08 63 * preemption is already disabled.
02239f0a426460 arch/arm/kernel/crunch.c Hartley Sweeten 2009-07-08 64 */
02239f0a426460 arch/arm/kernel/crunch.c Hartley Sweeten 2009-07-08 65 devcfg ^= EP93XX_SYSCON_DEVCFG_CPENA;
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 66 __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
02239f0a426460 arch/arm/kernel/crunch.c Hartley Sweeten 2009-07-08 67 __raw_writel(devcfg, EP93XX_SYSCON_DEVCFG);
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 68 }
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 69 break;
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 70 }
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 71
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 72 return NOTIFY_DONE;
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 73 }
c17fad11f3105c arch/arm/kernel/crunch.c Lennert Buytenhek 2006-06-27 74
:::::: The code at line 46 was first introduced by commit
:::::: c17fad11f3105ca4d5bbb2686725aad208f5ead4 [ARM] 3370/2: ep93xx: add crunch support
:::::: TO: Lennert Buytenhek <buytenh@xxxxxxxxxxxxxx>
:::::: CC: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip