All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use pid_t instead of int
@ 2016-05-08 19:38 René Nyffenegger
  2016-05-09  1:25 ` Andy Lutomirski
  0 siblings, 1 reply; 6+ messages in thread
From: René Nyffenegger @ 2016-05-08 19:38 UTC (permalink / raw)
  To: Andrew Morton, Josh Triplett, Al Viro, Steven Rostedt (Red Hat),
	Zach Brown, Milosz Tanski, Arnd Bergmann, linux-api,
	linux-kernel
  Cc: René Nyffenegger

Use pid_t instead of int in the declarations of sys_kill, sys_tgkill,
sys_tkill and sys_rt_sigqueueinfo in include/linux/syscalls.h

Signed-off-by: René Nyffenegger <mail@renenyffenegger.ch>
---
 include/linux/syscalls.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index d795472..d507e75 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -371,10 +371,10 @@ asmlinkage long sys_rt_sigtimedwait(const sigset_t __user *uthese,
 				size_t sigsetsize);
 asmlinkage long sys_rt_tgsigqueueinfo(pid_t tgid, pid_t  pid, int sig,
 		siginfo_t __user *uinfo);
-asmlinkage long sys_kill(int pid, int sig);
-asmlinkage long sys_tgkill(int tgid, int pid, int sig);
-asmlinkage long sys_tkill(int pid, int sig);
-asmlinkage long sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo);
+asmlinkage long sys_kill(pid_t pid, int sig);
+asmlinkage long sys_tgkill(int tgid, pid_t pid, int sig);
+asmlinkage long sys_tkill(pid_t pid, int sig);
+asmlinkage long sys_rt_sigqueueinfo(pid_t pid, int sig, siginfo_t __user *uinfo);
 asmlinkage long sys_sgetmask(void);
 asmlinkage long sys_ssetmask(int newmask);
 asmlinkage long sys_signal(int sig, __sighandler_t handler);
-- 
2.8.0

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

* Re: [PATCH] Use pid_t instead of int
  2016-05-08 19:38 [PATCH] Use pid_t instead of int René Nyffenegger
@ 2016-05-09  1:25 ` Andy Lutomirski
  2016-05-09  4:15     ` René Nyffenegger
  2016-05-09  6:36     ` René Nyffenegger
  0 siblings, 2 replies; 6+ messages in thread
From: Andy Lutomirski @ 2016-05-09  1:25 UTC (permalink / raw)
  To: René Nyffenegger
  Cc: Andrew Morton, Josh Triplett, Al Viro, Steven Rostedt (Red Hat),
	Zach Brown, Milosz Tanski, Arnd Bergmann, Linux API,
	linux-kernel

On Sun, May 8, 2016 at 12:38 PM, René Nyffenegger
<mail@renenyffenegger.ch> wrote:
> Use pid_t instead of int in the declarations of sys_kill, sys_tgkill,
> sys_tkill and sys_rt_sigqueueinfo in include/linux/syscalls.h

The description is no good.  *Why* are you changing it?

I checked tgkill and, indeed, tgkill takes pid_t parameters, so this
fixes an incorrect declaration.  I'm wondering why the code compiles
without warning.  Is SYSCALL_DEFINE too lenient for some reason?  Or
is pid_t just defined as int.

--Andy

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

* Re: [PATCH] Use pid_t instead of int
@ 2016-05-09  4:15     ` René Nyffenegger
  0 siblings, 0 replies; 6+ messages in thread
From: René Nyffenegger @ 2016-05-09  4:15 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: Andrew Morton, Josh Triplett, Al Viro, Steven Rostedt (Red Hat),
	Zach Brown, Milosz Tanski, Arnd Bergmann, Linux API,
	linux-kernel

Somewhere else, pid_t is a typedef for an int.

Rene

On 09.05.2016 03:25, Andy Lutomirski wrote:
> On Sun, May 8, 2016 at 12:38 PM, René Nyffenegger
> <mail@renenyffenegger.ch> wrote:
>> Use pid_t instead of int in the declarations of sys_kill, sys_tgkill,
>> sys_tkill and sys_rt_sigqueueinfo in include/linux/syscalls.h
> 
> The description is no good.  *Why* are you changing it?
> 
> I checked tgkill and, indeed, tgkill takes pid_t parameters, so this
> fixes an incorrect declaration.  I'm wondering why the code compiles
> without warning.  Is SYSCALL_DEFINE too lenient for some reason?  Or
> is pid_t just defined as int.
> 
> --Andy
> 

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

* Re: [PATCH] Use pid_t instead of int
@ 2016-05-09  4:15     ` René Nyffenegger
  0 siblings, 0 replies; 6+ messages in thread
From: René Nyffenegger @ 2016-05-09  4:15 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: Andrew Morton, Josh Triplett, Al Viro, Steven Rostedt (Red Hat),
	Zach Brown, Milosz Tanski, Arnd Bergmann, Linux API,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Somewhere else, pid_t is a typedef for an int.

Rene

On 09.05.2016 03:25, Andy Lutomirski wrote:
> On Sun, May 8, 2016 at 12:38 PM, René Nyffenegger
> <mail-gLCNRsNSrVdVZEhyV+6z5nIPMjoJpjVV@public.gmane.org> wrote:
>> Use pid_t instead of int in the declarations of sys_kill, sys_tgkill,
>> sys_tkill and sys_rt_sigqueueinfo in include/linux/syscalls.h
> 
> The description is no good.  *Why* are you changing it?
> 
> I checked tgkill and, indeed, tgkill takes pid_t parameters, so this
> fixes an incorrect declaration.  I'm wondering why the code compiles
> without warning.  Is SYSCALL_DEFINE too lenient for some reason?  Or
> is pid_t just defined as int.
> 
> --Andy
> 

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

* Re: [PATCH] Use pid_t instead of int
@ 2016-05-09  6:36     ` René Nyffenegger
  0 siblings, 0 replies; 6+ messages in thread
From: René Nyffenegger @ 2016-05-09  6:36 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: Andrew Morton, Josh Triplett, Al Viro, Steven Rostedt (Red Hat),
	Zach Brown, Milosz Tanski, Arnd Bergmann, Linux API,
	linux-kernel, René Nyffenegger

From: René Nyffenegger <mail@renenyffenegger.ch>

In include/linux/syscalls.h, the four functions sys_kill, sys_tgkill,
sys_tkill and sys_rt_sigqueueinfo are declared with "int pid" and
"int tgid".

However, in kernel/signal.c, the corresponding definitions use
the more appropriate "pid_t" (which is a typedef'd int).

This patch changes "int" to "pid_t" in the declarations of
sys_kill, sys_tgkill, sys_tkill and sys_rt_sigqueueinfo in
include/linux/syscalls.h in order to harmonize the function
declarations with their respective definitions.

Signed-off-by: René Nyffenegger <mail@renenyffenegger.ch>
---
 include/linux/syscalls.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index d795472..d507e75 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -371,10 +371,10 @@ asmlinkage long sys_rt_sigtimedwait(const sigset_t __user *uthese,
 				size_t sigsetsize);
 asmlinkage long sys_rt_tgsigqueueinfo(pid_t tgid, pid_t  pid, int sig,
 		siginfo_t __user *uinfo);
-asmlinkage long sys_kill(int pid, int sig);
-asmlinkage long sys_tgkill(int tgid, int pid, int sig);
-asmlinkage long sys_tkill(int pid, int sig);
-asmlinkage long sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo);
+asmlinkage long sys_kill(pid_t pid, int sig);
+asmlinkage long sys_tgkill(pid_t tgid, pid_t pid, int sig);
+asmlinkage long sys_tkill(pid_t pid, int sig);
+asmlinkage long sys_rt_sigqueueinfo(pid_t pid, int sig, siginfo_t __user *uinfo);
 asmlinkage long sys_sgetmask(void);
 asmlinkage long sys_ssetmask(int newmask);
 asmlinkage long sys_signal(int sig, __sighandler_t handler);
-- 
2.8.0

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

* Re: [PATCH] Use pid_t instead of int
@ 2016-05-09  6:36     ` René Nyffenegger
  0 siblings, 0 replies; 6+ messages in thread
From: René Nyffenegger @ 2016-05-09  6:36 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: Andrew Morton, Josh Triplett, Al Viro, Steven Rostedt (Red Hat),
	Zach Brown, Milosz Tanski, Arnd Bergmann, Linux API,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, René Nyffenegger

From: René Nyffenegger <mail-gLCNRsNSrVdVZEhyV+6z5nIPMjoJpjVV@public.gmane.org>

In include/linux/syscalls.h, the four functions sys_kill, sys_tgkill,
sys_tkill and sys_rt_sigqueueinfo are declared with "int pid" and
"int tgid".

However, in kernel/signal.c, the corresponding definitions use
the more appropriate "pid_t" (which is a typedef'd int).

This patch changes "int" to "pid_t" in the declarations of
sys_kill, sys_tgkill, sys_tkill and sys_rt_sigqueueinfo in
include/linux/syscalls.h in order to harmonize the function
declarations with their respective definitions.

Signed-off-by: René Nyffenegger <mail-gLCNRsNSrVdVZEhyV+6z5nIPMjoJpjVV@public.gmane.org>
---
 include/linux/syscalls.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index d795472..d507e75 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -371,10 +371,10 @@ asmlinkage long sys_rt_sigtimedwait(const sigset_t __user *uthese,
 				size_t sigsetsize);
 asmlinkage long sys_rt_tgsigqueueinfo(pid_t tgid, pid_t  pid, int sig,
 		siginfo_t __user *uinfo);
-asmlinkage long sys_kill(int pid, int sig);
-asmlinkage long sys_tgkill(int tgid, int pid, int sig);
-asmlinkage long sys_tkill(int pid, int sig);
-asmlinkage long sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo);
+asmlinkage long sys_kill(pid_t pid, int sig);
+asmlinkage long sys_tgkill(pid_t tgid, pid_t pid, int sig);
+asmlinkage long sys_tkill(pid_t pid, int sig);
+asmlinkage long sys_rt_sigqueueinfo(pid_t pid, int sig, siginfo_t __user *uinfo);
 asmlinkage long sys_sgetmask(void);
 asmlinkage long sys_ssetmask(int newmask);
 asmlinkage long sys_signal(int sig, __sighandler_t handler);
-- 
2.8.0

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

end of thread, other threads:[~2016-05-09  6:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-08 19:38 [PATCH] Use pid_t instead of int René Nyffenegger
2016-05-09  1:25 ` Andy Lutomirski
2016-05-09  4:15   ` René Nyffenegger
2016-05-09  4:15     ` René Nyffenegger
2016-05-09  6:36   ` René Nyffenegger
2016-05-09  6:36     ` René Nyffenegger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.