diff mbox series

[1/2] m68k: remove nargs from __SYSCALL

Message ID 1546442319-20461-2-git-send-email-firoz.khan@linaro.org
State New
Headers show
Series m68k: Unify the system call scripts | expand

Commit Message

Firoz Khan Jan. 2, 2019, 3:18 p.m. UTC
The __SYSCALL macro's arguments are system call number,
system call entry name and number of arguments for the
system call.

Argument- nargs in __SYSCALL(nr, entry, nargs) is neither
calculated nor used anywhere. So it would be better to
keep the implementaion as  __SYSCALL(nr, entry). This will
unifies the implementation with some other architetures
too.

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>

---
 arch/m68k/kernel/syscalls/syscalltbl.sh | 4 ++--
 arch/m68k/kernel/syscalltable.S         | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
1.9.1

Comments

Geert Uytterhoeven Jan. 3, 2019, 10:45 a.m. UTC | #1
Hi Firoz,

Thanks for your patch!

On Wed, Jan 2, 2019 at 4:19 PM Firoz Khan <firoz.khan@linaro.org> wrote:
> The __SYSCALL macro's arguments are system call number,

> system call entry name and number of arguments for the


name,

> system call.

>

> Argument- nargs in __SYSCALL(nr, entry, nargs) is neither


Argument nargs

> calculated nor used anywhere. So it would be better to

> keep the implementaion as  __SYSCALL(nr, entry). This will


implementation

> unifies the implementation with some other architetures


unify
architectures

> too.

>

> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>

> ---

>  arch/m68k/kernel/syscalls/syscalltbl.sh | 4 ++--

>  arch/m68k/kernel/syscalltable.S         | 2 +-

>  2 files changed, 3 insertions(+), 3 deletions(-)

>

> diff --git a/arch/m68k/kernel/syscalls/syscalltbl.sh b/arch/m68k/kernel/syscalls/syscalltbl.sh

> index 85d78d9..904b8e6 100644

> --- a/arch/m68k/kernel/syscalls/syscalltbl.sh

> +++ b/arch/m68k/kernel/syscalls/syscalltbl.sh

> @@ -13,10 +13,10 @@ emit() {

>         t_entry="$3"

>

>         while [ $t_nxt -lt $t_nr ]; do

> -               printf "__SYSCALL(%s, sys_ni_syscall, )\n" "${t_nxt}"

> +               printf "__SYSCALL(%s,sys_ni_syscall)\n" "${t_nxt}"


Please keep the space after the comma.

>                 t_nxt=$((t_nxt+1))

>         done

> -       printf "__SYSCALL(%s, %s, )\n" "${t_nxt}" "${t_entry}"

> +       printf "__SYSCALL(%s,%s)\n" "${t_nxt}" "${t_entry}"


Idem ditto.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Firoz Khan Jan. 3, 2019, 11:29 a.m. UTC | #2
Hi Geert,

Thanks for your feedback.

On Thu, 3 Jan 2019 at 16:15, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> >

> >         while [ $t_nxt -lt $t_nr ]; do

> > -               printf "__SYSCALL(%s, sys_ni_syscall, )\n" "${t_nxt}"

> > +               printf "__SYSCALL(%s,sys_ni_syscall)\n" "${t_nxt}"

>

> Please keep the space after the comma.


This is intentional as I was facing some compilation issue with
one architecture (If I'm right it is powerpc) when I keep the space
after comma.

Firoz
diff mbox series

Patch

diff --git a/arch/m68k/kernel/syscalls/syscalltbl.sh b/arch/m68k/kernel/syscalls/syscalltbl.sh
index 85d78d9..904b8e6 100644
--- a/arch/m68k/kernel/syscalls/syscalltbl.sh
+++ b/arch/m68k/kernel/syscalls/syscalltbl.sh
@@ -13,10 +13,10 @@  emit() {
 	t_entry="$3"
 
 	while [ $t_nxt -lt $t_nr ]; do
-		printf "__SYSCALL(%s, sys_ni_syscall, )\n" "${t_nxt}"
+		printf "__SYSCALL(%s,sys_ni_syscall)\n" "${t_nxt}"
 		t_nxt=$((t_nxt+1))
 	done
-	printf "__SYSCALL(%s, %s, )\n" "${t_nxt}" "${t_entry}"
+	printf "__SYSCALL(%s,%s)\n" "${t_nxt}" "${t_entry}"
 }
 
 grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S
index d329cc7..0082664 100644
--- a/arch/m68k/kernel/syscalltable.S
+++ b/arch/m68k/kernel/syscalltable.S
@@ -18,7 +18,7 @@ 
 #define sys_mmap2	sys_mmap_pgoff
 #endif
 
-#define __SYSCALL(nr, entry, nargs) .long entry
+#define __SYSCALL(nr, entry)	.long entry
 	.section .rodata
 ALIGN
 ENTRY(sys_call_table)