mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
powerpc: Only define __parse_fpscr() when required
[ Upstream commitc7e0d9bb91
] Clang 17 reports: arch/powerpc/kernel/traps.c:1167:19: error: unused function '__parse_fpscr' [-Werror,-Wunused-function] __parse_fpscr() is called from two sites. First call is guarded by #ifdef CONFIG_PPC_FPU_REGS Second call is guarded by CONFIG_MATH_EMULATION which selects CONFIG_PPC_FPU_REGS. So only define __parse_fpscr() when CONFIG_PPC_FPU_REGS is defined. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202309210327.WkqSd5Bq-lkp@intel.com/ Fixes:b6254ced4d
("powerpc/signal: Don't manage floating point regs when no FPU") Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/5de2998c57f3983563b27b39228ea9a7229d4110.1695385984.git.christophe.leroy@csgroup.eu Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
c39ab57032
commit
8d5e9875ae
1 changed files with 2 additions and 0 deletions
|
@ -1164,6 +1164,7 @@ void emulate_single_step(struct pt_regs *regs)
|
|||
__single_step_exception(regs);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PPC_FPU_REGS
|
||||
static inline int __parse_fpscr(unsigned long fpscr)
|
||||
{
|
||||
int ret = FPE_FLTUNK;
|
||||
|
@ -1190,6 +1191,7 @@ static inline int __parse_fpscr(unsigned long fpscr)
|
|||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void parse_fpe(struct pt_regs *regs)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue