Re: [powerpc:fixes-test 10/12] kernel/sched/core.c:7449:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int

Nathan Chancellor <[email protected]>
Newsgroups dev.linux.lists.llvm,dev.linux.lists.oe-kbuild-all,org.ozlabs.lists.linuxppc-dev
Message-ID <20260710223740.GA2667378@ax162>
On Sat, Jul 11, 2026 at 04:54:17AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git fixes-test
> head:   afc2830892a128a13a65f677271a0a48aeb61b5e
> commit: 4747e17fe063720a30b1c0075bae3e8f8acd26f4 [10/12] powerpc/32: Use HAVE_PREEMPT_DYNAMIC_CALL instead of HAVE_PREEMPT_DYNAMIC_KEY
> config: powerpc-randconfig-002-20260711 (https://download.01.org/0day-ci/archive/20260711/[email protected]/config)
> compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260711/[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/oe-kbuild-all/[email protected]/
> 
> All errors (new ones prefixed by >>):
> 
> >> kernel/sched/core.c:7449:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
>     7449 | EXPORT_STATIC_CALL_TRAMP(preempt_schedule);
>          | ^
>    include/linux/static_call.h:223:2: note: expanded from macro 'EXPORT_STATIC_CALL_TRAMP'
>      223 |         ARCH_ADD_TRAMP_KEY(name)
>          |         ^
> >> kernel/sched/core.c:7449:26: error: a parameter list without types is only allowed in a function definition
>     7449 | EXPORT_STATIC_CALL_TRAMP(preempt_schedule);
>          |                          ^

This happens with GCC as well.

  In file included from include/linux/tracepoint.h:22,
                   from include/trace/syscall.h:5,
                   from include/linux/syscalls.h:95,
                   from include/linux/syscalls_api.h:1,
                   from kernel/sched/core.c:16:
  include/linux/static_call.h:223:9: warning: data definition has no type or storage class
    223 |         ARCH_ADD_TRAMP_KEY(name)
        |         ^~~~~~~~~~~~~~~~~~
  kernel/sched/core.c:7449:1: note: in expansion of macro 'EXPORT_STATIC_CALL_TRAMP'
   7449 | EXPORT_STATIC_CALL_TRAMP(preempt_schedule);
        | ^~~~~~~~~~~~~~~~~~~~~~~~
  include/linux/static_call.h:223:9: error: type defaults to 'int' in declaration of 'ARCH_ADD_TRAMP_KEY' [-Wimplicit-int]
  kernel/sched/core.c:7449:1: note: in expansion of macro 'EXPORT_STATIC_CALL_TRAMP'
   7449 | EXPORT_STATIC_CALL_TRAMP(preempt_schedule);
        | ^~~~~~~~~~~~~~~~~~~~~~~~
  kernel/sched/core.c:7449:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
   7449 | EXPORT_STATIC_CALL_TRAMP(preempt_schedule);
        | ^~~~~~~~~~~~~~~~~~~~~~~~

-- 
Cheers,
Nathan
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.