All of lore.kernel.org
 help / color / mirror / Atom feed
* [ak:lto-5.13-1-wip 15/36] kernel/time/posix-stubs.c:34:43: warning: 'sys_timer_create' alias between functions of incompatible types 'long int(clockid_t, struct sigevent *, timer_t *)' {aka 'long int(int, struct sigevent *, int *)'} and 'long int(void)'
@ 2021-04-26  2:43 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-04-26  2:43 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 16985 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-misc.git lto-5.13-1-wip
head:   45fc24254df69291f9ebd597bc747df2eb61ee3a
commit: e309e527c8aafd61490688dbd7fc954046466609 [15/36] lto: Use C version for SYSCALL_ALIAS / cond_syscall
config: nds32-randconfig-r001-20210426 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-misc.git/commit/?id=e309e527c8aafd61490688dbd7fc954046466609
        git remote add ak https://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-misc.git
        git fetch --no-tags ak lto-5.13-1-wip
        git checkout e309e527c8aafd61490688dbd7fc954046466609
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=nds32 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   kernel/time/posix-stubs.c:25:17: warning: no previous prototype for 'sys_ni_posix_timers' [-Wmissing-prototypes]
      25 | asmlinkage long sys_ni_posix_timers(void)
         |                 ^~~~~~~~~~~~~~~~~~~
   kernel/time/posix-stubs.c:73:5: warning: no previous prototype for 'do_clock_gettime' [-Wmissing-prototypes]
      73 | int do_clock_gettime(clockid_t which_clock, struct timespec64 *tp)
         |     ^~~~~~~~~~~~~~~~
   In file included from kernel/time/posix-stubs.c:9:
>> kernel/time/posix-stubs.c:34:43: warning: 'sys_timer_create' alias between functions of incompatible types 'long int(clockid_t,  struct sigevent *, timer_t *)' {aka 'long int(int,  struct sigevent *, int *)'} and 'long int(void)' [-Wattribute-alias=]
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                                           ^~~~
   kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                       ^~~~~~~~~~~~~~~~~~~
   kernel/time/posix-stubs.c:41:1: note: in expansion of macro 'SYS_NI'
      41 | SYS_NI(timer_create);
         | ^~~~~~
   kernel/time/posix-stubs.c:25:17: note: aliased declaration here
      25 | asmlinkage long sys_ni_posix_timers(void)
         |                 ^~~~~~~~~~~~~~~~~~~
   In file included from kernel/time/posix-stubs.c:9:
>> kernel/time/posix-stubs.c:34:43: warning: 'sys_timer_gettime32' alias between functions of incompatible types 'long int(timer_t,  struct old_itimerspec32 *)' {aka 'long int(int,  struct old_itimerspec32 *)'} and 'long int(void)' [-Wattribute-alias=]
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                                           ^~~~
   kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                       ^~~~~~~~~~~~~~~~~~~
   kernel/time/posix-stubs.c:170:1: note: in expansion of macro 'SYS_NI'
     170 | SYS_NI(timer_gettime32);
         | ^~~~~~
   kernel/time/posix-stubs.c:25:17: note: aliased declaration here
      25 | asmlinkage long sys_ni_posix_timers(void)
         |                 ^~~~~~~~~~~~~~~~~~~
   In file included from kernel/time/posix-stubs.c:9:
>> kernel/time/posix-stubs.c:34:43: warning: 'sys_timer_settime32' alias between functions of incompatible types 'long int(timer_t,  int,  struct old_itimerspec32 *, struct old_itimerspec32 *)' {aka 'long int(int,  int,  struct old_itimerspec32 *, struct old_itimerspec32 *)'} and 'long int(void)' [-Wattribute-alias=]
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                                           ^~~~
   kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                       ^~~~~~~~~~~~~~~~~~~
   kernel/time/posix-stubs.c:169:1: note: in expansion of macro 'SYS_NI'
     169 | SYS_NI(timer_settime32);
         | ^~~~~~
   kernel/time/posix-stubs.c:25:17: note: aliased declaration here
      25 | asmlinkage long sys_ni_posix_timers(void)
         |                 ^~~~~~~~~~~~~~~~~~~
   In file included from kernel/time/posix-stubs.c:9:
>> kernel/time/posix-stubs.c:34:43: warning: 'sys_clock_adjtime32' alias between functions of incompatible types 'long int(clockid_t,  struct old_timex32 *)' {aka 'long int(int,  struct old_timex32 *)'} and 'long int(void)' [-Wattribute-alias=]
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                                           ^~~~
   kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                       ^~~~~~~~~~~~~~~~~~~
   kernel/time/posix-stubs.c:49:1: note: in expansion of macro 'SYS_NI'
      49 | SYS_NI(clock_adjtime32);
         | ^~~~~~
   kernel/time/posix-stubs.c:25:17: note: aliased declaration here
      25 | asmlinkage long sys_ni_posix_timers(void)
         |                 ^~~~~~~~~~~~~~~~~~~
   In file included from kernel/time/posix-stubs.c:9:
>> kernel/time/posix-stubs.c:34:43: warning: 'sys_setitimer' alias between functions of incompatible types 'long int(int,  struct __kernel_old_itimerval *, struct __kernel_old_itimerval *)' and 'long int(void)' [-Wattribute-alias=]
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                                           ^~~~
   kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                       ^~~~~~~~~~~~~~~~~~~
   kernel/time/posix-stubs.c:48:1: note: in expansion of macro 'SYS_NI'
      48 | SYS_NI(setitimer);
         | ^~~~~~
   kernel/time/posix-stubs.c:25:17: note: aliased declaration here
      25 | asmlinkage long sys_ni_posix_timers(void)
         |                 ^~~~~~~~~~~~~~~~~~~
   In file included from kernel/time/posix-stubs.c:9:
>> kernel/time/posix-stubs.c:34:43: warning: 'sys_getitimer' alias between functions of incompatible types 'long int(int,  struct __kernel_old_itimerval *)' and 'long int(void)' [-Wattribute-alias=]
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                                           ^~~~
   kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                       ^~~~~~~~~~~~~~~~~~~
   kernel/time/posix-stubs.c:47:1: note: in expansion of macro 'SYS_NI'
      47 | SYS_NI(getitimer);
         | ^~~~~~
   kernel/time/posix-stubs.c:25:17: note: aliased declaration here
      25 | asmlinkage long sys_ni_posix_timers(void)
         |                 ^~~~~~~~~~~~~~~~~~~
   In file included from kernel/time/posix-stubs.c:9:
>> kernel/time/posix-stubs.c:34:43: warning: 'sys_clock_adjtime' alias between functions of incompatible types 'long int(clockid_t,  struct __kernel_timex *)' {aka 'long int(int,  struct __kernel_timex *)'} and 'long int(void)' [-Wattribute-alias=]
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                                           ^~~~
   kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                       ^~~~~~~~~~~~~~~~~~~
   kernel/time/posix-stubs.c:46:1: note: in expansion of macro 'SYS_NI'
      46 | SYS_NI(clock_adjtime);
         | ^~~~~~
   kernel/time/posix-stubs.c:25:17: note: aliased declaration here
      25 | asmlinkage long sys_ni_posix_timers(void)
         |                 ^~~~~~~~~~~~~~~~~~~
   In file included from kernel/time/posix-stubs.c:9:
>> kernel/time/posix-stubs.c:34:43: warning: 'sys_timer_delete' alias between functions of incompatible types 'long int(timer_t)' {aka 'long int(int)'} and 'long int(void)' [-Wattribute-alias=]
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                                           ^~~~
   kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                       ^~~~~~~~~~~~~~~~~~~
   kernel/time/posix-stubs.c:45:1: note: in expansion of macro 'SYS_NI'
      45 | SYS_NI(timer_delete);
         | ^~~~~~
   kernel/time/posix-stubs.c:25:17: note: aliased declaration here
      25 | asmlinkage long sys_ni_posix_timers(void)
         |                 ^~~~~~~~~~~~~~~~~~~
   In file included from kernel/time/posix-stubs.c:9:
>> kernel/time/posix-stubs.c:34:43: warning: 'sys_timer_settime' alias between functions of incompatible types 'long int(timer_t,  int,  const struct __kernel_itimerspec *, struct __kernel_itimerspec *)' {aka 'long int(int,  int,  const struct __kernel_itimerspec *, struct __kernel_itimerspec *)'} and 'long int(void)' [-Wattribute-alias=]
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                                           ^~~~
   kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                       ^~~~~~~~~~~~~~~~~~~
   kernel/time/posix-stubs.c:44:1: note: in expansion of macro 'SYS_NI'
      44 | SYS_NI(timer_settime);
         | ^~~~~~
   kernel/time/posix-stubs.c:25:17: note: aliased declaration here
      25 | asmlinkage long sys_ni_posix_timers(void)
         |                 ^~~~~~~~~~~~~~~~~~~
   In file included from kernel/time/posix-stubs.c:9:
>> kernel/time/posix-stubs.c:34:43: warning: 'sys_timer_getoverrun' alias between functions of incompatible types 'long int(timer_t)' {aka 'long int(int)'} and 'long int(void)' [-Wattribute-alias=]
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                                           ^~~~
   kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                       ^~~~~~~~~~~~~~~~~~~
   kernel/time/posix-stubs.c:43:1: note: in expansion of macro 'SYS_NI'
      43 | SYS_NI(timer_getoverrun);
         | ^~~~~~
   kernel/time/posix-stubs.c:25:17: note: aliased declaration here
      25 | asmlinkage long sys_ni_posix_timers(void)
         |                 ^~~~~~~~~~~~~~~~~~~
   In file included from kernel/time/posix-stubs.c:9:
>> kernel/time/posix-stubs.c:34:43: warning: 'sys_timer_gettime' alias between functions of incompatible types 'long int(timer_t,  struct __kernel_itimerspec *)' {aka 'long int(int,  struct __kernel_itimerspec *)'} and 'long int(void)' [-Wattribute-alias=]
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                                           ^~~~
   kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
      34 | #define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
         |                       ^~~~~~~~~~~~~~~~~~~
   kernel/time/posix-stubs.c:42:1: note: in expansion of macro 'SYS_NI'
      42 | SYS_NI(timer_gettime);
         | ^~~~~~
   kernel/time/posix-stubs.c:25:17: note: aliased declaration here
      25 | asmlinkage long sys_ni_posix_timers(void)
         |                 ^~~~~~~~~~~~~~~~~~~


vim +34 kernel/time/posix-stubs.c

    24	
  > 25	asmlinkage long sys_ni_posix_timers(void)
    26	{
    27		pr_err_once("process %d (%s) attempted a POSIX timer syscall "
    28			    "while CONFIG_POSIX_TIMERS is not set\n",
    29			    current->pid, current->comm);
    30		return -ENOSYS;
    31	}
    32	
    33	#ifndef SYS_NI
  > 34	#define SYS_NI(name)  SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
    35	#endif
    36	
    37	#ifndef COMPAT_SYS_NI
    38	#define COMPAT_SYS_NI(name)  SYSCALL_ALIAS(compat_sys_##name, sys_ni_posix_timers)
    39	#endif
    40	
  > 41	SYS_NI(timer_create);
    42	SYS_NI(timer_gettime);
  > 43	SYS_NI(timer_getoverrun);
  > 44	SYS_NI(timer_settime);
  > 45	SYS_NI(timer_delete);
  > 46	SYS_NI(clock_adjtime);
  > 47	SYS_NI(getitimer);
  > 48	SYS_NI(setitimer);
  > 49	SYS_NI(clock_adjtime32);
    50	#ifdef __ARCH_WANT_SYS_ALARM
    51	SYS_NI(alarm);
    52	#endif
    53	
    54	/*
    55	 * We preserve minimal support for CLOCK_REALTIME and CLOCK_MONOTONIC
    56	 * as it is easy to remain compatible with little code. CLOCK_BOOTTIME
    57	 * is also included for convenience as at least systemd uses it.
    58	 */
    59	
    60	SYSCALL_DEFINE2(clock_settime, const clockid_t, which_clock,
    61			const struct __kernel_timespec __user *, tp)
    62	{
    63		struct timespec64 new_tp;
    64	
    65		if (which_clock != CLOCK_REALTIME)
    66			return -EINVAL;
    67		if (get_timespec64(&new_tp, tp))
    68			return -EFAULT;
    69	
    70		return do_sys_settimeofday64(&new_tp, NULL);
    71	}
    72	
    73	int do_clock_gettime(clockid_t which_clock, struct timespec64 *tp)
    74	{
    75		switch (which_clock) {
    76		case CLOCK_REALTIME:
    77			ktime_get_real_ts64(tp);
    78			break;
    79		case CLOCK_MONOTONIC:
    80			ktime_get_ts64(tp);
    81			timens_add_monotonic(tp);
    82			break;
    83		case CLOCK_BOOTTIME:
    84			ktime_get_boottime_ts64(tp);
    85			timens_add_boottime(tp);
    86			break;
    87		default:
    88			return -EINVAL;
    89		}
    90	
    91		return 0;
    92	}
    93	SYSCALL_DEFINE2(clock_gettime, const clockid_t, which_clock,
    94			struct __kernel_timespec __user *, tp)
    95	{
    96		int ret;
    97		struct timespec64 kernel_tp;
    98	
    99		ret = do_clock_gettime(which_clock, &kernel_tp);
   100		if (ret)
   101			return ret;
   102	
   103		if (put_timespec64(&kernel_tp, tp))
   104			return -EFAULT;
   105		return 0;
   106	}
   107	
   108	SYSCALL_DEFINE2(clock_getres, const clockid_t, which_clock, struct __kernel_timespec __user *, tp)
   109	{
   110		struct timespec64 rtn_tp = {
   111			.tv_sec = 0,
   112			.tv_nsec = hrtimer_resolution,
   113		};
   114	
   115		switch (which_clock) {
   116		case CLOCK_REALTIME:
   117		case CLOCK_MONOTONIC:
   118		case CLOCK_BOOTTIME:
   119			if (put_timespec64(&rtn_tp, tp))
   120				return -EFAULT;
   121			return 0;
   122		default:
   123			return -EINVAL;
   124		}
   125	}
   126	
   127	SYSCALL_DEFINE4(clock_nanosleep, const clockid_t, which_clock, int, flags,
   128			const struct __kernel_timespec __user *, rqtp,
   129			struct __kernel_timespec __user *, rmtp)
   130	{
   131		struct timespec64 t;
   132		ktime_t texp;
   133	
   134		switch (which_clock) {
   135		case CLOCK_REALTIME:
   136		case CLOCK_MONOTONIC:
   137		case CLOCK_BOOTTIME:
   138			break;
   139		default:
   140			return -EINVAL;
   141		}
   142	
   143		if (get_timespec64(&t, rqtp))
   144			return -EFAULT;
   145		if (!timespec64_valid(&t))
   146			return -EINVAL;
   147		if (flags & TIMER_ABSTIME)
   148			rmtp = NULL;
   149		current->restart_block.nanosleep.type = rmtp ? TT_NATIVE : TT_NONE;
   150		current->restart_block.nanosleep.rmtp = rmtp;
   151		texp = timespec64_to_ktime(t);
   152		if (flags & TIMER_ABSTIME)
   153			texp = timens_ktime_to_host(which_clock, texp);
   154		return hrtimer_nanosleep(texp, flags & TIMER_ABSTIME ?
   155					 HRTIMER_MODE_ABS : HRTIMER_MODE_REL,
   156					 which_clock);
   157	}
   158	
   159	#ifdef CONFIG_COMPAT
   160	COMPAT_SYS_NI(timer_create);
   161	#endif
   162	
   163	#if defined(CONFIG_COMPAT) || defined(CONFIG_ALPHA)
   164	COMPAT_SYS_NI(getitimer);
   165	COMPAT_SYS_NI(setitimer);
   166	#endif
   167	
   168	#ifdef CONFIG_COMPAT_32BIT_TIME
 > 169	SYS_NI(timer_settime32);
 > 170	SYS_NI(timer_gettime32);
   171	

---
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: 22072 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-26  2:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-26  2:43 [ak:lto-5.13-1-wip 15/36] kernel/time/posix-stubs.c:34:43: warning: 'sys_timer_create' alias between functions of incompatible types 'long int(clockid_t, struct sigevent *, timer_t *)' {aka 'long int(int, struct sigevent *, int *)'} and 'long int(void)' 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.