* Re: [PATCH] time: remove useless "const" keyword in ns_to_kernel_old_timeval() and ns_to_timespec64()
2022-07-12 7:47 ` [PATCH] time: remove useless "const" keyword in ns_to_kernel_old_timeval() and ns_to_timespec64() Youngmin Nam
@ 2022-07-12 7:41 ` Arnd Bergmann
2022-07-12 7:49 ` Chanho Park
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2022-07-12 7:41 UTC (permalink / raw)
To: Youngmin Nam
Cc: Arnd Bergmann, John Stultz, Thomas Gleixner, Stephen Boyd,
Linux Kernel Mailing List, Chanho Park, hajun.sung, hosung0.kim,
d7271.choe
On Tue, Jul 12, 2022 at 9:47 AM Youngmin Nam <youngmin.nam@samsung.com> wrote:
>
> As mentioned below,
> https://lore.kernel.org/lkml/CAK8P3a3nknJgEDESGdJH91jMj6R_xydFqWASd8r5BbesdvMBgA@mail.gmail.com/
>
> The "const" keyword is useless, so we drop it from the function definition and declaration.
>
> Change-Id: If35bba78aa7757476e22be42afc719c27fb0f527
> Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
The patch looks good, but the description can be improved:
- drop the useless Change-Id field
- move the URL into a 'Link: field'
- wrap the lines to fit into the normal width of an email (under 80 characters,
ideally 70)
- explain why the change helps, rather than just stating the keyword is useless.
In your description, it's not clear if one is better than the other, it sounds
like it should make no difference.
With that done:
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] time: remove useless "const" keyword in ns_to_kernel_old_timeval() and ns_to_timespec64()
[not found] <CGME20220712071941epcas2p2faa87d8efe182e9c28a924ea3de15209@epcas2p2.samsung.com>
@ 2022-07-12 7:47 ` Youngmin Nam
2022-07-12 7:41 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Youngmin Nam @ 2022-07-12 7:47 UTC (permalink / raw)
To: arnd, jstultz, tglx
Cc: sboyd, linux-kernel, youngmin.nam, chanho61.park, hajun.sung,
hosung0.kim, d7271.choe
As mentioned below,
https://lore.kernel.org/lkml/CAK8P3a3nknJgEDESGdJH91jMj6R_xydFqWASd8r5BbesdvMBgA@mail.gmail.com/
The "const" keyword is useless, so we drop it from the function definition and declaration.
Change-Id: If35bba78aa7757476e22be42afc719c27fb0f527
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
---
include/linux/time64.h | 2 +-
kernel/time/time.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/time64.h b/include/linux/time64.h
index 81b9686a2079..ee021da0966e 100644
--- a/include/linux/time64.h
+++ b/include/linux/time64.h
@@ -142,7 +142,7 @@ static inline s64 timespec64_to_ns(const struct timespec64 *ts)
*
* Returns the timespec64 representation of the nsec parameter.
*/
-extern struct timespec64 ns_to_timespec64(const s64 nsec);
+extern struct timespec64 ns_to_timespec64(s64 nsec);
/**
* timespec64_add_ns - Adds nanoseconds to a timespec64
diff --git a/kernel/time/time.c b/kernel/time/time.c
index 29923b20e0e4..526257b3727c 100644
--- a/kernel/time/time.c
+++ b/kernel/time/time.c
@@ -449,7 +449,7 @@ time64_t mktime64(const unsigned int year0, const unsigned int mon0,
}
EXPORT_SYMBOL(mktime64);
-struct __kernel_old_timeval ns_to_kernel_old_timeval(const s64 nsec)
+struct __kernel_old_timeval ns_to_kernel_old_timeval(s64 nsec)
{
struct timespec64 ts = ns_to_timespec64(nsec);
struct __kernel_old_timeval tv;
@@ -503,7 +503,7 @@ EXPORT_SYMBOL(set_normalized_timespec64);
*
* Returns the timespec64 representation of the nsec parameter.
*/
-struct timespec64 ns_to_timespec64(const s64 nsec)
+struct timespec64 ns_to_timespec64(s64 nsec)
{
struct timespec64 ts = { 0, 0 };
s32 rem;
--
2.34.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] time: remove useless "const" keyword in ns_to_kernel_old_timeval() and ns_to_timespec64()
2022-07-12 7:41 ` Arnd Bergmann
@ 2022-07-12 7:49 ` Chanho Park
0 siblings, 0 replies; 3+ messages in thread
From: Chanho Park @ 2022-07-12 7:49 UTC (permalink / raw)
To: 'Arnd Bergmann', 'Youngmin Nam'
Cc: 'John Stultz', 'Thomas Gleixner',
'Stephen Boyd', 'Linux Kernel Mailing List',
hajun.sung, hosung0.kim, d7271.choe
> > As mentioned below,
> >
> https://lore.kernel.org/lkml/CAK8P3a3nknJgEDESGdJH91jMj6R_xydFqWASd8r5Bbes
> dvMBgA@mail.gmail.com/
I'm not sure why you drop my originality but please use my commit message and put this link between --- and include/linux/time32.h if you need additional comments.
https://lore.kernel.org/all/20220531064346.51677-1-chanho61.park@samsung.com/T/
Indeed you should put Fixes tag for stable tree.
Best Regards,
Chanho Park
> >
> > The "const" keyword is useless, so we drop it from the function
> definition and declaration.
> >
> > Change-Id: If35bba78aa7757476e22be42afc719c27fb0f527
> > Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
>
> The patch looks good, but the description can be improved:
>
> - drop the useless Change-Id field
> - move the URL into a 'Link: field'
> - wrap the lines to fit into the normal width of an email (under 80
> characters,
> ideally 70)
> - explain why the change helps, rather than just stating the keyword is
> useless.
> In your description, it's not clear if one is better than the other, it
> sounds
> like it should make no difference.
>
> With that done:
>
> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-12 7:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20220712071941epcas2p2faa87d8efe182e9c28a924ea3de15209@epcas2p2.samsung.com>
2022-07-12 7:47 ` [PATCH] time: remove useless "const" keyword in ns_to_kernel_old_timeval() and ns_to_timespec64() Youngmin Nam
2022-07-12 7:41 ` Arnd Bergmann
2022-07-12 7:49 ` Chanho Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox