From: kernel test robot <lkp@intel.com>
To: Sagi Maimon <maimon.sagi@gmail.com>,
richardcochran@gmail.com, luto@kernel.org, datglx@linutronix.de,
mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com,
x86@kernel.org, hpa@zytor.com, arnd@arndb.de,
geert@linux-m68k.org, peterz@infradead.org, hannes@cmpxchg.org,
sohil.mehta@intel.com, rick.p.edgecombe@intel.com,
nphamcs@gmail.com, palmer@sifive.com, keescook@chromium.org,
legion@kernel.org, mark.rutland@arm.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
linux-arch@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH v3] posix-timers: add multi_clock_gettime system call
Date: Fri, 29 Dec 2023 12:03:11 +0800 [thread overview]
Message-ID: <202312291154.hCJdKLKM-lkp@intel.com> (raw)
In-Reply-To: <20231228122411.3189-1-maimon.sagi@gmail.com>
Hi Sagi,
kernel test robot noticed the following build errors:
[auto build test ERROR on tip/x86/asm]
[also build test ERROR on arnd-asm-generic/master tip/timers/core linus/master v6.7-rc7]
[cannot apply to next-20231222]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Sagi-Maimon/posix-timers-add-multi_clock_gettime-system-call/20231228-202632
base: tip/x86/asm
patch link: https://lore.kernel.org/r/20231228122411.3189-1-maimon.sagi%40gmail.com
patch subject: [PATCH v3] posix-timers: add multi_clock_gettime system call
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20231229/202312291154.hCJdKLKM-lkp@intel.com/config)
compiler: clang version 18.0.0git (https://github.com/llvm/llvm-project 8a4266a626914765c0c69839e8a51be383013c1a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231229/202312291154.hCJdKLKM-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312291154.hCJdKLKM-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
In file included from kernel/time/time.c:33:
>> include/linux/syscalls.h:1164:48: warning: declaration of 'struct __ptp_multi_clock_get' will not be visible outside of this function [-Wvisibility]
1164 | asmlinkage long sys_multi_clock_gettime(struct __ptp_multi_clock_get __user * ptp_multi_clk_get);
| ^
1 warning generated.
--
In file included from kernel/time/hrtimer.c:30:
>> include/linux/syscalls.h:1164:48: warning: declaration of 'struct __ptp_multi_clock_get' will not be visible outside of this function [-Wvisibility]
1164 | asmlinkage long sys_multi_clock_gettime(struct __ptp_multi_clock_get __user * ptp_multi_clk_get);
| ^
kernel/time/hrtimer.c:147:20: warning: unused function 'is_migration_base' [-Wunused-function]
147 | static inline bool is_migration_base(struct hrtimer_clock_base *base)
| ^~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:1876:20: warning: unused function '__hrtimer_peek_ahead_timers' [-Wunused-function]
1876 | static inline void __hrtimer_peek_ahead_timers(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.
--
In file included from kernel/time/posix-timers.c:26:
>> include/linux/syscalls.h:1164:48: warning: declaration of 'struct __ptp_multi_clock_get' will not be visible outside of this function [-Wvisibility]
1164 | asmlinkage long sys_multi_clock_gettime(struct __ptp_multi_clock_get __user * ptp_multi_clk_get);
| ^
>> kernel/time/posix-timers.c:1430:1: error: conflicting types for 'sys_multi_clock_gettime'
1430 | SYSCALL_DEFINE1(multi_clock_gettime, struct __ptp_multi_clock_get __user *, ptp_multi_clk_get)
| ^
include/linux/syscalls.h:219:36: note: expanded from macro 'SYSCALL_DEFINE1'
219 | #define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__)
| ^
include/linux/syscalls.h:230:2: note: expanded from macro 'SYSCALL_DEFINEx'
230 | __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
| ^
include/linux/syscalls.h:244:18: note: expanded from macro '__SYSCALL_DEFINEx'
244 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
| ^
<scratch space>:135:1: note: expanded from here
135 | sys_multi_clock_gettime
| ^
include/linux/syscalls.h:1164:17: note: previous declaration is here
1164 | asmlinkage long sys_multi_clock_gettime(struct __ptp_multi_clock_get __user * ptp_multi_clk_get);
| ^
1 warning and 1 error generated.
vim +/sys_multi_clock_gettime +1430 kernel/time/posix-timers.c
1429
> 1430 SYSCALL_DEFINE1(multi_clock_gettime, struct __ptp_multi_clock_get __user *, ptp_multi_clk_get)
1431 {
1432 const struct k_clock *kc;
1433 struct timespec64 kernel_tp;
1434 struct __ptp_multi_clock_get multi_clk_get;
1435 unsigned int i, j;
1436 int error;
1437
1438 if (copy_from_user(&multi_clk_get, ptp_multi_clk_get, sizeof(multi_clk_get)))
1439 return -EFAULT;
1440
1441 if (multi_clk_get.n_samples > MULTI_PTP_MAX_SAMPLES)
1442 return -EINVAL;
1443 if (multi_clk_get.n_clocks > MULTI_PTP_MAX_CLOCKS)
1444 return -EINVAL;
1445
1446 for (j = 0; j < multi_clk_get.n_samples; j++) {
1447 for (i = 0; i < multi_clk_get.n_clocks; i++) {
1448 kc = clockid_to_kclock(multi_clk_get.clkid_arr[i]);
1449 if (!kc)
1450 return -EINVAL;
1451 error = kc->clock_get_timespec(multi_clk_get.clkid_arr[i], &kernel_tp);
1452 if (!error && put_timespec64(&kernel_tp, (struct __kernel_timespec __user *)
1453 &ptp_multi_clk_get->ts[j][i]))
1454 error = -EFAULT;
1455 }
1456 }
1457
1458 return error;
1459 }
1460
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-12-29 4:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-28 12:24 [PATCH v3] posix-timers: add multi_clock_gettime system call Sagi Maimon
2023-12-29 3:21 ` kernel test robot
2023-12-29 4:03 ` kernel test robot [this message]
2023-12-29 15:26 ` Arnd Bergmann
2023-12-31 16:00 ` Sagi Maimon
2024-01-02 11:29 ` Arnd Bergmann
2024-01-07 14:05 ` Sagi Maimon
2024-01-11 7:31 ` Richard Cochran
2024-01-15 15:49 ` Sagi Maimon
2024-01-15 23:41 ` Richard Cochran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202312291154.hCJdKLKM-lkp@intel.com \
--to=lkp@intel.com \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=datglx@linutronix.de \
--cc=dave.hansen@linux.intel.com \
--cc=geert@linux-m68k.org \
--cc=hannes@cmpxchg.org \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=legion@kernel.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=luto@kernel.org \
--cc=maimon.sagi@gmail.com \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nphamcs@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=palmer@sifive.com \
--cc=peterz@infradead.org \
--cc=richardcochran@gmail.com \
--cc=rick.p.edgecombe@intel.com \
--cc=sohil.mehta@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).