* [PATCH] linux/time32.h: correct ns_to_kernel_old_timeval prototype
[not found] <CGME20220531064348epcas2p2168f11ba49e9a119219bebe18a769dff@epcas2p2.samsung.com>
@ 2022-05-31 6:43 ` Chanho Park
2022-05-31 11:25 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Chanho Park @ 2022-05-31 6:43 UTC (permalink / raw)
To: Arnd Bergmann, John Stultz, Thomas Gleixner
Cc: Stephen Boyd, linux-kernel, Chanho Park
The function argument is defined with const identifier in
kernel/time/time.c but the prototype looks different between time.c and
time32.h. There is a review[1] why it was omitted during review stage but
they should be matched.
- The function is defined in kernel/time/time.c as below:
struct __kernel_old_timeval ns_to_kernel_old_timeval(const s64 nsec)
[1]: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1637458.html
Fixes: a84d1169164b ("y2038: Introduce struct __kernel_old_timeval")
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
---
include/linux/time32.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/time32.h b/include/linux/time32.h
index 83a400b6ba99..88c135d4c557 100644
--- a/include/linux/time32.h
+++ b/include/linux/time32.h
@@ -67,6 +67,6 @@ int put_old_timex32(struct old_timex32 __user *, const struct __kernel_timex *);
*
* Returns the timeval representation of the nsec parameter.
*/
-extern struct __kernel_old_timeval ns_to_kernel_old_timeval(s64 nsec);
+extern struct __kernel_old_timeval ns_to_kernel_old_timeval(const s64 nsec);
#endif
--
2.36.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] linux/time32.h: correct ns_to_kernel_old_timeval prototype
2022-05-31 6:43 ` [PATCH] linux/time32.h: correct ns_to_kernel_old_timeval prototype Chanho Park
@ 2022-05-31 11:25 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2022-05-31 11:25 UTC (permalink / raw)
To: Chanho Park
Cc: Arnd Bergmann, John Stultz, Thomas Gleixner, Stephen Boyd, linux-kernel
On Tue, May 31, 2022 at 8:43 AM Chanho Park <chanho61.park@samsung.com> wrote:
>
> The function argument is defined with const identifier in
> kernel/time/time.c but the prototype looks different between time.c and
> time32.h. There is a review[1] why it was omitted during review stage but
> they should be matched.
Thanks for report and the patch!
Since the 'const' keyword is still useless here, I would suggest
instead dropping
it from the function definition where I accidentally left it, and from the
related ns_to_timespec64() as well, both its declaration and definition.
Arnd
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-31 11:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20220531064348epcas2p2168f11ba49e9a119219bebe18a769dff@epcas2p2.samsung.com>
2022-05-31 6:43 ` [PATCH] linux/time32.h: correct ns_to_kernel_old_timeval prototype Chanho Park
2022-05-31 11:25 ` Arnd Bergmann
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).