linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Finn Thain <fthain@telegraphics.com.au>
To: Firoz Khan <firoz.khan@linaro.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-m68k@lists.linux-m68k.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Philippe Ombredanne <pombredanne@nexb.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Kate Stewart <kstewart@linuxfoundation.org>,
	y2038@lists.linaro.org, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org, arnd@arndb.de,
	deepa.kernel@gmail.com, marcin.juszkiewicz@linaro.org
Subject: Re: [PATCH v3 3/5] m68k: add system call table generation support
Date: Tue, 2 Oct 2018 08:52:03 +1000 (AEST)	[thread overview]
Message-ID: <alpine.LNX.2.21.1810020843320.10@nippy.intranet> (raw)
In-Reply-To: <1538397477-4003-4-git-send-email-firoz.khan@linaro.org>

On Mon, 1 Oct 2018, Firoz Khan wrote:

> --- /dev/null
> +++ b/arch/m68k/kernel/syscalls/syscallhdr.sh
> @@ -0,0 +1,35 @@
> +#!/bin/sh

That's not accurate. These are bash scripts, not Bourne shell.

If you run 'checkbashisms', you'll see that a few small changes are needed 
in order to gain standards compliance and portability.

Some untested suggestions:

diff --git a/arch/m68k/kernel/syscalls/syscallhdr.sh b/arch/m68k/kernel/syscalls/syscallhdr.sh
index e0e3108cfc7f..9811f82848e6 100644
--- a/arch/m68k/kernel/syscalls/syscallhdr.sh
+++ b/arch/m68k/kernel/syscalls/syscallhdr.sh
@@ -18,17 +18,17 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
     nxt=0
     while read nr abi name entry ; do
 	if [ -z "$offset" ]; then
-	    echo -e "#define __NR_${prefix}${name}\t$nr"
+	    echo "#define __NR_${prefix}${name}	$nr"
 	else
-	    echo -e "#define __NR_${prefix}${name}\t($offset + $nr)"
+	    echo "#define __NR_${prefix}${name}	($offset + $nr)"
 	fi
 	nxt=$nr
-	let nxt=nxt+1
+	nxt=$((nxt+1))
     done
 
     echo ""
     echo "#ifdef __KERNEL__"
-    echo -e "#define __NR_syscalls\t$nxt"
+    echo "#define __NR_syscalls	$nxt"
     echo "#endif"
     echo ""
     echo "#endif /* ${fileguard} */"
diff --git a/arch/m68k/kernel/syscalls/syscalltbl.sh b/arch/m68k/kernel/syscalls/syscalltbl.sh
index d2635dea4e96..89ab047097ce 100644
--- a/arch/m68k/kernel/syscalls/syscalltbl.sh
+++ b/arch/m68k/kernel/syscalls/syscalltbl.sh
@@ -13,7 +13,7 @@ emit() {
 
     while [ $nxt -lt $nr ]; do
 	echo "__SYSCALL($nxt, sys_ni_syscall, )"
-	let nxt=nxt+1
+	nxt=$((nxt+1))
     done
 
     echo "__SYSCALL($nr, $entry, )"
@@ -29,6 +29,6 @@ grep '^[0-9]' "$in" | sort -n | (
     while read nr abi name entry ; do
 	emit $nxt $nr $entry
 	nxt=$nr
-        let nxt=nxt+1
+        nxt=$((nxt+1))
     done
 ) > "$out"

-- 

  reply	other threads:[~2018-10-01 22:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01 12:37 [PATCH v3 0/5] System call table generation support Firoz Khan
2018-10-01 12:37 ` [PATCH v3 1/5] m68k: rename system call table file name Firoz Khan
2018-10-01 12:37 ` [PATCH v3 2/5] m68k: replace NR_syscalls macro from asm/unistd.h Firoz Khan
2018-10-01 12:37 ` [PATCH v3 3/5] m68k: add system call table generation support Firoz Khan
2018-10-01 22:52   ` Finn Thain [this message]
2018-10-15  4:12     ` Firoz Khan
2018-10-01 12:37 ` [PATCH v3 4/5] m68k: uapi header and system call table file generation Firoz Khan
2018-10-01 12:37 ` [PATCH v3 5/5] m68k: add __IGNORE* entries in asm/unistd.h Firoz Khan
2018-10-01 12:51   ` Arnd Bergmann

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=alpine.LNX.2.21.1810020843320.10@nippy.intranet \
    --to=fthain@telegraphics.com.au \
    --cc=arnd@arndb.de \
    --cc=deepa.kernel@gmail.com \
    --cc=firoz.khan@linaro.org \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=marcin.juszkiewicz@linaro.org \
    --cc=pombredanne@nexb.com \
    --cc=tglx@linutronix.de \
    --cc=y2038@lists.linaro.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).