* arch/mips/include/asm/fpu.h:79 __enable_fpu() warn: ignoring unreachable code.
@ 2020-08-18 6:06 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-08-18 6:06 UTC (permalink / raw)
To: Liangliang Huang
Cc: kbuild-all, linux-kernel, Thomas Bogendoerfer, Huacai Chen
[-- Attachment #1: Type: text/plain, Size: 2553 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 06a4ec1d9dc652e17ee3ac2ceb6c7cf6c2b75cdd
commit: c9b0299034665d594e56ee343f28033d1b24de6d MIPS: Use fallthrough for arch/mips
date: 3 months ago
config: mips-randconfig-m031-20200818 (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
New smatch warnings:
arch/mips/include/asm/fpu.h:79 __enable_fpu() warn: ignoring unreachable code.
arch/mips/include/asm/fpu.h:79 __enable_fpu() warn: ignoring unreachable code.
Old smatch warnings:
arch/mips/kernel/traps.c:1914 nmi_exception_handler() warn: ignoring unreachable code.
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c9b0299034665d594e56ee343f28033d1b24de6d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout c9b0299034665d594e56ee343f28033d1b24de6d
vim +79 arch/mips/include/asm/fpu.h
53
54 static inline int __enable_fpu(enum fpu_mode mode)
55 {
56 int fr;
57
58 switch (mode) {
59 case FPU_AS_IS:
60 /* just enable the FPU in its current mode */
61 set_c0_status(ST0_CU1);
62 enable_fpu_hazard();
63 return 0;
64
65 case FPU_HYBRID:
66 if (!cpu_has_fre)
67 return SIGFPE;
68
69 /* set FRE */
70 set_c0_config5(MIPS_CONF5_FRE);
71 goto fr_common;
72
73 case FPU_64BIT:
74 #if !(defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6) \
75 || defined(CONFIG_64BIT))
76 /* we only have a 32-bit FPU */
77 return SIGFPE;
78 #endif
> 79 fallthrough;
80 case FPU_32BIT:
81 if (cpu_has_fre) {
82 /* clear FRE */
83 clear_c0_config5(MIPS_CONF5_FRE);
84 }
85 fr_common:
86 /* set CU1 & change FR appropriately */
87 fr = (int)mode & FPU_FR_MASK;
88 change_c0_status(ST0_CU1 | ST0_FR, ST0_CU1 | (fr ? ST0_FR : 0));
89 enable_fpu_hazard();
90
91 /* check FR has the desired value */
92 if (!!(read_c0_status() & ST0_FR) == !!fr)
93 return 0;
94
95 /* unsupported FR value */
96 __disable_fpu();
97 return SIGFPE;
98
99 default:
100 BUG();
101 }
102
103 return SIGFPE;
104 }
105
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34638 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* arch/mips/include/asm/fpu.h:79 __enable_fpu() warn: ignoring unreachable code.
@ 2021-04-23 18:50 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-04-23 18:50 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 6376 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Liangliang Huang <huanglllzu@gmail.com>
CC: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
CC: Huacai Chen <chenhc@lemote.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5bfc75d92efd494db37f5c4c173d3639d4772966
commit: c9b0299034665d594e56ee343f28033d1b24de6d MIPS: Use fallthrough for arch/mips
date: 12 months ago
:::::: branch date: 86 minutes ago
:::::: commit date: 12 months ago
config: mips-randconfig-m031-20210423 (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
arch/mips/include/asm/fpu.h:79 __enable_fpu() warn: ignoring unreachable code.
arch/mips/include/asm/fpu.h:79 __enable_fpu() warn: ignoring unreachable code.
Old smatch warnings:
arch/mips/kernel/traps.c:1914 nmi_exception_handler() warn: ignoring unreachable code.
vim +79 arch/mips/include/asm/fpu.h
84ab45b33858a8 arch/mips/include/asm/fpu.h Paul Burton 2015-01-30 53
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 54 static inline int __enable_fpu(enum fpu_mode mode)
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 55 {
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 56 int fr;
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 57
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 58 switch (mode) {
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 59 case FPU_AS_IS:
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 60 /* just enable the FPU in its current mode */
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 61 set_c0_status(ST0_CU1);
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 62 enable_fpu_hazard();
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 63 return 0;
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 64
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 65 case FPU_HYBRID:
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 66 if (!cpu_has_fre)
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 67 return SIGFPE;
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 68
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 69 /* set FRE */
d33e6fe3ca7410 arch/mips/include/asm/fpu.h Ralf Baechle 2014-12-17 70 set_c0_config5(MIPS_CONF5_FRE);
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 71 goto fr_common;
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 72
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 73 case FPU_64BIT:
fcc53b5f6c38ac arch/mips/include/asm/fpu.h Markos Chandras 2015-07-16 74 #if !(defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6) \
6134d94923d035 arch/mips/include/asm/fpu.h Markos Chandras 2015-01-30 75 || defined(CONFIG_64BIT))
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 76 /* we only have a 32-bit FPU */
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 77 return SIGFPE;
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 78 #endif
c9b0299034665d arch/mips/include/asm/fpu.h Liangliang Huang 2020-05-04 @79 fallthrough;
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 80 case FPU_32BIT:
b0c34f6155e2d8 arch/mips/include/asm/fpu.h Ralf Baechle 2014-12-17 81 if (cpu_has_fre) {
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 82 /* clear FRE */
d33e6fe3ca7410 arch/mips/include/asm/fpu.h Ralf Baechle 2014-12-17 83 clear_c0_config5(MIPS_CONF5_FRE);
b0c34f6155e2d8 arch/mips/include/asm/fpu.h Ralf Baechle 2014-12-17 84 }
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 85 fr_common:
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 86 /* set CU1 & change FR appropriately */
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 87 fr = (int)mode & FPU_FR_MASK;
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 88 change_c0_status(ST0_CU1 | ST0_FR, ST0_CU1 | (fr ? ST0_FR : 0));
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 89 enable_fpu_hazard();
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 90
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 91 /* check FR has the desired value */
84ab45b33858a8 arch/mips/include/asm/fpu.h Paul Burton 2015-01-30 92 if (!!(read_c0_status() & ST0_FR) == !!fr)
84ab45b33858a8 arch/mips/include/asm/fpu.h Paul Burton 2015-01-30 93 return 0;
84ab45b33858a8 arch/mips/include/asm/fpu.h Paul Burton 2015-01-30 94
84ab45b33858a8 arch/mips/include/asm/fpu.h Paul Burton 2015-01-30 95 /* unsupported FR value */
84ab45b33858a8 arch/mips/include/asm/fpu.h Paul Burton 2015-01-30 96 __disable_fpu();
84ab45b33858a8 arch/mips/include/asm/fpu.h Paul Burton 2015-01-30 97 return SIGFPE;
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 98
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 99 default:
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 100 BUG();
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 101 }
97b8b16bfcb7f5 arch/mips/include/asm/fpu.h Aaro Koskinen 2014-02-05 102
97b8b16bfcb7f5 arch/mips/include/asm/fpu.h Aaro Koskinen 2014-02-05 103 return SIGFPE;
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 104 }
^1da177e4c3f41 include/asm-mips/fpu.h Linus Torvalds 2005-04-16 105
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26468 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* arch/mips/include/asm/fpu.h:79 __enable_fpu() warn: ignoring unreachable code.
@ 2020-06-24 21:03 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-06-24 21:03 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 6663 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Liangliang Huang <huanglllzu@gmail.com>
CC: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
CC: Huacai Chen <chenhc@lemote.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 26e122e97a3d0390ebec389347f64f3730fdf48f
commit: c9b0299034665d594e56ee343f28033d1b24de6d MIPS: Use fallthrough for arch/mips
date: 7 weeks ago
:::::: branch date: 27 hours ago
:::::: commit date: 7 weeks ago
config: mips-randconfig-m031-20200624 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
arch/mips/include/asm/fpu.h:79 __enable_fpu() warn: ignoring unreachable code.
arch/mips/include/asm/fpu.h:79 __enable_fpu() warn: ignoring unreachable code.
Old smatch warnings:
arch/mips/kernel/traps.c:1914 nmi_exception_handler() warn: ignoring unreachable code.
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c9b0299034665d594e56ee343f28033d1b24de6d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout c9b0299034665d594e56ee343f28033d1b24de6d
vim +79 arch/mips/include/asm/fpu.h
84ab45b33858a8 arch/mips/include/asm/fpu.h Paul Burton 2015-01-30 53
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 54 static inline int __enable_fpu(enum fpu_mode mode)
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 55 {
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 56 int fr;
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 57
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 58 switch (mode) {
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 59 case FPU_AS_IS:
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 60 /* just enable the FPU in its current mode */
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 61 set_c0_status(ST0_CU1);
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 62 enable_fpu_hazard();
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 63 return 0;
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 64
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 65 case FPU_HYBRID:
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 66 if (!cpu_has_fre)
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 67 return SIGFPE;
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 68
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 69 /* set FRE */
d33e6fe3ca7410 arch/mips/include/asm/fpu.h Ralf Baechle 2014-12-17 70 set_c0_config5(MIPS_CONF5_FRE);
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 71 goto fr_common;
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 72
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 73 case FPU_64BIT:
fcc53b5f6c38ac arch/mips/include/asm/fpu.h Markos Chandras 2015-07-16 74 #if !(defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6) \
6134d94923d035 arch/mips/include/asm/fpu.h Markos Chandras 2015-01-30 75 || defined(CONFIG_64BIT))
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 76 /* we only have a 32-bit FPU */
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 77 return SIGFPE;
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 78 #endif
c9b0299034665d arch/mips/include/asm/fpu.h Liangliang Huang 2020-05-04 @79 fallthrough;
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 80 case FPU_32BIT:
b0c34f6155e2d8 arch/mips/include/asm/fpu.h Ralf Baechle 2014-12-17 81 if (cpu_has_fre) {
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 82 /* clear FRE */
d33e6fe3ca7410 arch/mips/include/asm/fpu.h Ralf Baechle 2014-12-17 83 clear_c0_config5(MIPS_CONF5_FRE);
b0c34f6155e2d8 arch/mips/include/asm/fpu.h Ralf Baechle 2014-12-17 84 }
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 85 fr_common:
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 86 /* set CU1 & change FR appropriately */
4227a2d4efc9c8 arch/mips/include/asm/fpu.h Paul Burton 2014-09-11 87 fr = (int)mode & FPU_FR_MASK;
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 88 change_c0_status(ST0_CU1 | ST0_FR, ST0_CU1 | (fr ? ST0_FR : 0));
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 89 enable_fpu_hazard();
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 90
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 91 /* check FR has the desired value */
84ab45b33858a8 arch/mips/include/asm/fpu.h Paul Burton 2015-01-30 92 if (!!(read_c0_status() & ST0_FR) == !!fr)
84ab45b33858a8 arch/mips/include/asm/fpu.h Paul Burton 2015-01-30 93 return 0;
84ab45b33858a8 arch/mips/include/asm/fpu.h Paul Burton 2015-01-30 94
84ab45b33858a8 arch/mips/include/asm/fpu.h Paul Burton 2015-01-30 95 /* unsupported FR value */
84ab45b33858a8 arch/mips/include/asm/fpu.h Paul Burton 2015-01-30 96 __disable_fpu();
84ab45b33858a8 arch/mips/include/asm/fpu.h Paul Burton 2015-01-30 97 return SIGFPE;
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 98
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 99 default:
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 100 BUG();
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 101 }
97b8b16bfcb7f5 arch/mips/include/asm/fpu.h Aaro Koskinen 2014-02-05 102
97b8b16bfcb7f5 arch/mips/include/asm/fpu.h Aaro Koskinen 2014-02-05 103 return SIGFPE;
597ce1723e0fa0 arch/mips/include/asm/fpu.h Paul Burton 2013-11-22 104 }
^1da177e4c3f41 include/asm-mips/fpu.h Linus Torvalds 2005-04-16 105
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32191 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-23 18:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-18 6:06 arch/mips/include/asm/fpu.h:79 __enable_fpu() warn: ignoring unreachable code kernel test robot
2020-08-18 6:06 ` kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-04-23 18:50 kernel test robot
2020-06-24 21:03 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.