linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Alejandro Colomar <alx.manpages@gmail.com>
Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ipc.2: Fix prototype parameter types
Date: Tue, 9 Feb 2021 19:59:47 +0100	[thread overview]
Message-ID: <d51a100d-07d9-8917-b4c1-be57ce16dc4b@gmail.com> (raw)
In-Reply-To: <20210207123654.187829-1-alx.manpages@gmail.com>

Hi Alex,

On 2/7/21 1:36 PM, Alejandro Colomar wrote:
> The types for some of the parameters are incorrect
> (different than the kernel).  Fix them.
> Below are shown the types that the kernel uses.

Thanks. Patch applied.

Cheers,

Michael

> ......
> 
> .../linux$ grep_syscall ipc
> ipc/syscall.c:110:
> SYSCALL_DEFINE6(ipc, unsigned int, call, int, first, unsigned long, second,
> 		unsigned long, third, void __user *, ptr, long, fifth)
> ipc/syscall.c:205:
> COMPAT_SYSCALL_DEFINE6(ipc, u32, call, int, first, int, second,
> 	u32, third, compat_uptr_t, ptr, u32, fifth)
> include/linux/compat.h:874:
> asmlinkage long compat_sys_ipc(u32, int, int, u32, compat_uptr_t, u32);
> include/linux/syscalls.h:1221:
> asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second,
> 		unsigned long third, void __user *ptr, long fifth);
> .../linux$
> 
> function grep_syscall()
> {
> 	if ! [ -v 1 ]; then
> 		>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
> 		return ${EX_USAGE};
> 	fi
> 
> 	find * -type f \
> 	|grep '\.c$' \
> 	|sort -V \
> 	|xargs pcregrep -Mn "(?s)^\w*SYSCALL_DEFINE.\(${1},.*?\)" \
> 	|sed -E 's/^[^:]+:[0-9]+:/&\n/';
> 
> 	find * -type f \
> 	|grep '\.[ch]$' \
> 	|sort -V \
> 	|xargs pcregrep -Mn "(?s)^asmlinkage\s+[\w\s]+\**sys_${1}\s*\(.*?\)" \
> 	|sed -E 's/^[^:]+:[0-9]+:/&\n/';
> }
> 
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
> ---
>  man2/ipc.2 | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/man2/ipc.2 b/man2/ipc.2
> index 6589ffae6..a36e895a2 100644
> --- a/man2/ipc.2
> +++ b/man2/ipc.2
> @@ -27,9 +27,8 @@
>  ipc \- System V IPC system calls
>  .SH SYNOPSIS
>  .nf
> -.BI "int ipc(unsigned int " call ", int " first ", int " second \
> -", int " third ,
> -.BI "        void *" ptr ", long " fifth );
> +.BI "int ipc(unsigned int " call ", int " first ", unsigned long " second ,
> +.BI "        unsigned long " third ", void *" ptr ", long " fifth );
>  .fi
>  .PP
>  .IR Note :
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

      reply	other threads:[~2021-02-10  1:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04  9:30 [PATCH] ipc.2: Fix prototype parameter types Alejandro Colomar
2021-02-07 12:36 ` [PATCH v2] " Alejandro Colomar
2021-02-09 18:59   ` Michael Kerrisk (man-pages) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d51a100d-07d9-8917-b4c1-be57ce16dc4b@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=alx.manpages@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).