[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YujB/of1WSWsoHkw@perf>
Date: Tue, 2 Aug 2022 15:19:42 +0900
From: Youngmin Nam <youngmin.nam@...sung.com>
To: John Stultz <jstultz@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>
Cc: Arnd Bergmann <arnd@...db.de>, Stephen Boyd <sboyd@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Chanho Park <chanho61.park@...sung.com>,
hajun.sung@...sung.com, hosung0.kim@...sung.com,
d7271.choe@...sung.com, youngmin.nam@...sung.com
Subject: Re: [PATCH] time: correct the prototype of ns_to_kernel_old_timeval
and ns_to_timespec64
Hi Jone, Thomas.
Could you consider applying this patch ?
Thanks
On Tue, Jul 12, 2022 at 11:25:22AM +0200, Arnd Bergmann wrote:
> On Tue, Jul 12, 2022 at 11:47 AM Youngmin Nam <youngmin.nam@...sung.com> wrote:
> >
> > 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.
> > And there is a review in Link[1] why it was omitted during review stage,
> > so they should be matched.
> >
> > Likewise, we can remove the "const" keyword in both definition and declaration
> > of ns_to_timespec64() as it was metentined below Link[2] and Link[3].
> >
> > Link[1]: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1637458.html
> > Link[2]: https://lore.kernel.org/all/20220531064346.51677-1-chanho61.park@samsung.com/T/
> > Link[3]: https://lore.kernel.org/lkml/CAK8P3a3nknJgEDESGdJH91jMj6R_xydFqWASd8r5BbesdvMBgA@mail.gmail.com
> > Fixes: a84d1169164b ("y2038: Introduce struct __kernel_old_timeval")
> > Signed-off-by: Youngmin Nam <youngmin.nam@...sung.com>
>
> Reviewed-by: Arnd Bergmann <arnd@...db.de>
>
Powered by blists - more mailing lists