linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] syscalls: Fix file comments for syscalls implemented in kernel/sys.c
@ 2020-11-12 21:56 Tal Zussman
  2020-11-16 16:23 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Tal Zussman @ 2020-11-12 21:56 UTC (permalink / raw)
  To: Arnd Bergmann, linux-api, linux-kernel, linux-arch

The relevant syscalls were previously moved from kernel/timer.c to kernel/sys.c,
but the comments weren't updated to reflect this change.

Fixing these comments messes up the alphabetical ordering of syscalls by
filename. This could be fixed by merging the two groups of kernel/sys.c syscalls,
but that would require reordering the syscalls and renumbering them to maintain
the numerical order in unistd.h.

Signed-off-by: Tal Zussman <tz2294@columbia.edu>
---
 include/linux/syscalls.h          | 2 +-
 include/uapi/asm-generic/unistd.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 37bea07c12f2..629870fbb2c9 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -744,7 +744,7 @@ asmlinkage long sys_settimeofday(struct __kernel_old_timeval __user *tv,
 asmlinkage long sys_adjtimex(struct __kernel_timex __user *txc_p);
 asmlinkage long sys_adjtimex_time32(struct old_timex32 __user *txc_p);
 
-/* kernel/timer.c */
+/* kernel/sys.c */
 asmlinkage long sys_getpid(void);
 asmlinkage long sys_getppid(void);
 asmlinkage long sys_getuid(void);
diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h
index 2056318988f7..fc48c64700eb 100644
--- a/include/uapi/asm-generic/unistd.h
+++ b/include/uapi/asm-generic/unistd.h
@@ -517,7 +517,7 @@ __SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday)
 __SC_3264(__NR_adjtimex, sys_adjtimex_time32, sys_adjtimex)
 #endif
 
-/* kernel/timer.c */
+/* kernel/sys.c */
 #define __NR_getpid 172
 __SYSCALL(__NR_getpid, sys_getpid)
 #define __NR_getppid 173
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] syscalls: Fix file comments for syscalls implemented in kernel/sys.c
  2020-11-12 21:56 [PATCH] syscalls: Fix file comments for syscalls implemented in kernel/sys.c Tal Zussman
@ 2020-11-16 16:23 ` Christoph Hellwig
  2020-11-16 16:44   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2020-11-16 16:23 UTC (permalink / raw)
  To: Tal Zussman; +Cc: Arnd Bergmann, linux-api, linux-kernel, linux-arch

On Thu, Nov 12, 2020 at 04:56:57PM -0500, Tal Zussman wrote:
> The relevant syscalls were previously moved from kernel/timer.c to kernel/sys.c,
> but the comments weren't updated to reflect this change.
> 
> Fixing these comments messes up the alphabetical ordering of syscalls by
> filename. This could be fixed by merging the two groups of kernel/sys.c syscalls,
> but that would require reordering the syscalls and renumbering them to maintain
> the numerical order in unistd.h.

Lots of overly long lines in your commit log.

As for the patch itself:  IMHO we should just remove the comments
about the files as that information is completely irrelevant.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] syscalls: Fix file comments for syscalls implemented in kernel/sys.c
  2020-11-16 16:23 ` Christoph Hellwig
@ 2020-11-16 16:44   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2020-11-16 16:44 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Tal Zussman, Arnd Bergmann, Linux API, linux-kernel, linux-arch

On Mon, Nov 16, 2020 at 5:23 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> On Thu, Nov 12, 2020 at 04:56:57PM -0500, Tal Zussman wrote:
> > The relevant syscalls were previously moved from kernel/timer.c to kernel/sys.c,
> > but the comments weren't updated to reflect this change.
> >
> > Fixing these comments messes up the alphabetical ordering of syscalls by
> > filename. This could be fixed by merging the two groups of kernel/sys.c syscalls,
> > but that would require reordering the syscalls and renumbering them to maintain
> > the numerical order in unistd.h.
>
> Lots of overly long lines in your commit log.
>
> As for the patch itself:  IMHO we should just remove the comments
> about the files as that information is completely irrelevant.

I noticed I already applied the patch last week to the asm-generic cleanups
branch, but forgot to send out the email about it.

I do agree the file names are rather useless, and I would apply a follow-up
patch to completely remove them as well. My real plan was to remove
the file itself and replace it with the parsable syscall.tbl format that we
use for all non-generic architectures, but I haven't gotten around to updating
the patch that Firoz Khan did a long time ago.

      arnd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-16 16:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12 21:56 [PATCH] syscalls: Fix file comments for syscalls implemented in kernel/sys.c Tal Zussman
2020-11-16 16:23 ` Christoph Hellwig
2020-11-16 16:44   ` 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).