]> git.baikalelectronics.ru Git - kernel.git/commit
time: Correct the prototype of ns_to_kernel_old_timeval and ns_to_timespec64
authorYoungmin Nam <youngmin.nam@samsung.com>
Tue, 12 Jul 2022 09:47:15 +0000 (18:47 +0900)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 9 Aug 2022 18:02:13 +0000 (20:02 +0200)
commitfb59ee3a9e75be83a125ce3984c1da144b1d0f6d
treef18a91390c8760a6cc50ac24ab0245bdce9f4516
parentaabd8fb5e1023d99c6c49fc3c819a245878cd5a5
time: Correct the prototype of ns_to_kernel_old_timeval and ns_to_timespec64

In ns_to_kernel_old_timeval() definition, the function argument is defined
with const identifier in kernel/time/time.c, but the prototype in
include/linux/time32.h looks different.

- The function is defined in kernel/time/time.c as below:
  struct __kernel_old_timeval ns_to_kernel_old_timeval(const s64 nsec)

- The function is decalared in include/linux/time32.h as below:
  extern struct __kernel_old_timeval ns_to_kernel_old_timeval(s64 nsec);

Because the variable of arithmethic types isn't modified in the calling scope,
there's no need to mark arguments as const, which was already mentioned during
review (Link[1) of the original patch.

Likewise remove the "const" keyword in both definition and declaration of
ns_to_timespec64() as requested by Arnd (Link[2]).

Fixes: 2db32f492f08 ("y2038: Introduce struct __kernel_old_timeval")
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/all/20220712094715.2918823-1-youngmin.nam@samsung.com
Link[1]: https://lore.kernel.org/all/20180310081123.thin6wphgk7tongy@gmail.com/
Link[2]: https://lore.kernel.org/all/CAK8P3a3nknJgEDESGdJH91jMj6R_xydFqWASd8r5BbesdvMBgA@mail.gmail.com/
include/linux/time64.h
kernel/time/time.c