[tglx-devel:entry/rework 18/18] arch/powerpc/kernel/syscall.c:22:17: error: expected ')' before 'return'

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild
Message-ID <[email protected]>
:::::: 
:::::: Manual check reason: "low confidence bisect report"
:::::: 

BCC: [email protected]
CC: [email protected]
TO: "Michal Suchánek" <[email protected]>
CC: Thomas Gleixner <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git entry/rework
head:   af0a53579c942e9d22020e22347b4bf94686bcf0
commit: af0a53579c942e9d22020e22347b4bf94686bcf0 [18/18] entry, treewide: Make syscall_enter_from_user_mode[_work]() indicate syscall execution
:::::: branch date: 9 hours ago
:::::: commit date: 9 hours ago
config: powerpc64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260708/[email protected]/config)
compiler: powerpc64-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260708/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

All error/warnings (new ones prefixed by >>):

   arch/powerpc/kernel/syscall.c: In function 'system_call_exception':
>> arch/powerpc/kernel/syscall.c:22:17: error: expected ')' before 'return'
      22 |                 return syscall_get_error(current, regs);
         |                 ^~~~~~
   arch/powerpc/kernel/syscall.c:21:12: note: to match this '('
      21 |         if (unlikely(!syscall_enter_from_user_mode_randomize_stack(regs, &r0))
         |            ^
>> arch/powerpc/kernel/syscall.c:63:1: error: expected expression before '}' token
      63 | }
         | ^
>> arch/powerpc/kernel/syscall.c:19:20: warning: unused variable 'f' [-Wunused-variable]
      19 |         syscall_fn f;
         |                    ^
>> arch/powerpc/kernel/syscall.c:18:14: warning: unused variable 'ret' [-Wunused-variable]
      18 |         long ret;
         |              ^~~
>> arch/powerpc/kernel/syscall.c:63:1: warning: control reaches end of non-void function [-Wreturn-type]
      63 | }
         | ^


vim +22 arch/powerpc/kernel/syscall.c

1547db7d1f4481 Xiu Jianfeng            2022-07-01  13  
1547db7d1f4481 Xiu Jianfeng            2022-07-01  14  
1547db7d1f4481 Xiu Jianfeng            2022-07-01  15  /* Has to run notrace because it is entered not completely "reconciled" */
f8971c627b1404 Rohan McLure            2022-09-21  16  notrace long system_call_exception(struct pt_regs *regs, unsigned long r0)
1547db7d1f4481 Xiu Jianfeng            2022-07-01  17  {
f4a0318f278d98 Xiu Jianfeng            2022-07-01 @18  	long ret;
1547db7d1f4481 Xiu Jianfeng            2022-07-01 @19  	syscall_fn f;
1547db7d1f4481 Xiu Jianfeng            2022-07-01  20  
af0a53579c942e Michal Suchánek         2026-07-06 @21  	if (unlikely(!syscall_enter_from_user_mode_randomize_stack(regs, &r0))
af0a53579c942e Michal Suchánek         2026-07-06 @22  		return syscall_get_error(current, regs);
a96ef5848cb096 Ryan Roberts            2026-03-03  23  
bee25f97ad2464 Mukesh Kumar Chaurasiya 2026-04-27  24  	if (unlikely(r0 >= NR_syscalls)) {
1547db7d1f4481 Xiu Jianfeng            2022-07-01  25  		if (unlikely(trap_is_unsupported_scv(regs))) {
1547db7d1f4481 Xiu Jianfeng            2022-07-01  26  			/* Unsupported scv vector */
1547db7d1f4481 Xiu Jianfeng            2022-07-01  27  			_exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
1547db7d1f4481 Xiu Jianfeng            2022-07-01  28  			return regs->gpr[3];
1547db7d1f4481 Xiu Jianfeng            2022-07-01  29  		}
1547db7d1f4481 Xiu Jianfeng            2022-07-01  30  		return -ENOSYS;
1547db7d1f4481 Xiu Jianfeng            2022-07-01  31  	}
1547db7d1f4481 Xiu Jianfeng            2022-07-01  32  
1547db7d1f4481 Xiu Jianfeng            2022-07-01  33  	/* May be faster to do array_index_nospec? */
1547db7d1f4481 Xiu Jianfeng            2022-07-01  34  	barrier_nospec();
1547db7d1f4481 Xiu Jianfeng            2022-07-01  35  
7e92e01b724526 Rohan McLure            2022-09-21  36  #ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER
7e92e01b724526 Rohan McLure            2022-09-21  37  	// No COMPAT if we have SYSCALL_WRAPPER, see Kconfig
7e92e01b724526 Rohan McLure            2022-09-21  38  	f = (void *)sys_call_table[r0];
7e92e01b724526 Rohan McLure            2022-09-21  39  	ret = f(regs);
7e92e01b724526 Rohan McLure            2022-09-21  40  #else
1547db7d1f4481 Xiu Jianfeng            2022-07-01  41  	if (unlikely(is_compat_task())) {
7e92e01b724526 Rohan McLure            2022-09-21  42  		unsigned long r3, r4, r5, r6, r7, r8;
7e92e01b724526 Rohan McLure            2022-09-21  43  
1547db7d1f4481 Xiu Jianfeng            2022-07-01  44  		f = (void *)compat_sys_call_table[r0];
1547db7d1f4481 Xiu Jianfeng            2022-07-01  45  
7e92e01b724526 Rohan McLure            2022-09-21  46  		r3 = regs->gpr[3] & 0x00000000ffffffffULL;
7e92e01b724526 Rohan McLure            2022-09-21  47  		r4 = regs->gpr[4] & 0x00000000ffffffffULL;
7e92e01b724526 Rohan McLure            2022-09-21  48  		r5 = regs->gpr[5] & 0x00000000ffffffffULL;
7e92e01b724526 Rohan McLure            2022-09-21  49  		r6 = regs->gpr[6] & 0x00000000ffffffffULL;
7e92e01b724526 Rohan McLure            2022-09-21  50  		r7 = regs->gpr[7] & 0x00000000ffffffffULL;
7e92e01b724526 Rohan McLure            2022-09-21  51  		r8 = regs->gpr[8] & 0x00000000ffffffffULL;
1547db7d1f4481 Xiu Jianfeng            2022-07-01  52  
7e92e01b724526 Rohan McLure            2022-09-21  53  		ret = f(r3, r4, r5, r6, r7, r8);
1547db7d1f4481 Xiu Jianfeng            2022-07-01  54  	} else {
1547db7d1f4481 Xiu Jianfeng            2022-07-01  55  		f = (void *)sys_call_table[r0];
1547db7d1f4481 Xiu Jianfeng            2022-07-01  56  
7e92e01b724526 Rohan McLure            2022-09-21  57  		ret = f(regs->gpr[3], regs->gpr[4], regs->gpr[5],
7e92e01b724526 Rohan McLure            2022-09-21  58  			regs->gpr[6], regs->gpr[7], regs->gpr[8]);
7e92e01b724526 Rohan McLure            2022-09-21  59  	}
7e92e01b724526 Rohan McLure            2022-09-21  60  #endif
f4a0318f278d98 Xiu Jianfeng            2022-07-01  61  
f4a0318f278d98 Xiu Jianfeng            2022-07-01  62  	return ret;
1547db7d1f4481 Xiu Jianfeng            2022-07-01 @63  }

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.