From patchwork Thu Jun 13 13:29:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 2716391 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A4EDAC1459 for ; Thu, 13 Jun 2013 13:30:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7B8AC20278 for ; Thu, 13 Jun 2013 13:30:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB26F2026E for ; Thu, 13 Jun 2013 13:30:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757883Ab3FMNaG (ORCPT ); Thu, 13 Jun 2013 09:30:06 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:44762 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756419Ab3FMNaC (ORCPT ); Thu, 13 Jun 2013 09:30:02 -0400 Received: from ayumi.isobedori.kobe.vergenet.net (p5212-ipbfp1903kobeminato.hyogo.ocn.ne.jp [114.172.132.212]) by kirsty.vergenet.net (Postfix) with ESMTP id 65A95266CED; Thu, 13 Jun 2013 23:30:00 +1000 (EST) Received: by ayumi.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id 0EB786CE066; Thu, 13 Jun 2013 22:29:57 +0900 (JST) Date: Thu, 13 Jun 2013 22:29:57 +0900 From: Simon Horman To: Geert Uytterhoeven Cc: Yoshinori Sato , Magnus Damm , Russell King , Paul Mundt , David McCullough , Thorsten Glaser , linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: Re: [PATCH 2/3] ARM: shmobile: Use POSIX "$((..))" instead of bashism "$[...]" Message-ID: <20130613132957.GA22787@verge.net.au> References: <1371129052-31506-1-git-send-email-geert@linux-m68k.org> <1371129052-31506-3-git-send-email-geert@linux-m68k.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1371129052-31506-3-git-send-email-geert@linux-m68k.org> Organisation: Horms Solutions Ltd. User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, Jun 13, 2013 at 03:10:51PM +0200, Geert Uytterhoeven wrote: > According to the bash 4.1 manpage, "$[...]" is deprecated, and will be > removed in upcoming versions of bash. > Hence replace the bash-specific "$[...]" by POSIX "$((..))" for arithmetic > expansion, which also allows to drop the forced use of bash. > > Signed-off-by: Geert Uytterhoeven > --- > arch/arm/mach-shmobile/Makefile.boot | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot > index 95ebc7c..75a55e1 100644 > --- a/arch/arm/mach-shmobile/Makefile.boot > +++ b/arch/arm/mach-shmobile/Makefile.boot > @@ -1,5 +1,5 @@ > -__ZRELADDR := $(shell /bin/bash -c 'printf "0x%08x" \ > - $$[$(CONFIG_MEMORY_START) + 0x8000]') > +__ZRELADDR := $(shell printf "0x%08x" \ > + $$(($(CONFIG_MEMORY_START) + 0x8000))) > > zreladdr-y += $(__ZRELADDR) This code was (very) recently changed by a patch that I have queued up for v3.11 in the cleanup-boot branch of my renesas tree on kernel.org. I believe that patch removes the instance of $[..]]. commit 12dca809ef785e451263351325d4806198040b40 Author: Magnus Damm Date: Mon Jun 10 18:28:57 2013 +0900 ARM: shmobile: uImage load address rework This is V2 of the mach-shmobile uImage load address rework patch. Rework the mach-shmobile uImage load address calculation by storing the per-board load addresses in Makefile.boot. This removes the CONFIG_MEMORY_START dependency from Makefile.boot, and it also makes it possible to create safe kernel images that boot on multiple boards. This is one of several series of code that reworks code not to rely on CONFIG_MEMORY_START/SIZE which in turn is needed for ARCH_MULTIPLATFORM. Signed-off-by: Magnus Damm Reviewed-by: Laurent Pinchart Reviewed-by: Kuninori Morimoto Signed-off-by: Simon Horman --- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot index 498efd9..6b147ea 100644 --- a/arch/arm/mach-shmobile/Makefile.boot +++ b/arch/arm/mach-shmobile/Makefile.boot @@ -1,6 +1,22 @@ -__ZRELADDR := $(shell /bin/bash -c 'printf "0x%08x" \ - $$[$(CONFIG_MEMORY_START) + 0x8000]') +# per-board load address for uImage +loadaddr-y := +loadaddr-$(CONFIG_MACH_AG5EVM) += 0x40008000 +loadaddr-$(CONFIG_MACH_AP4EVB) += 0x40008000 +loadaddr-$(CONFIG_MACH_APE6EVM) += 0x40008000 +loadaddr-$(CONFIG_MACH_ARMADILLO800EVA) += 0x40008000 +loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += 0x40008000 +loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000 +loadaddr-$(CONFIG_MACH_BONITO) += 0x40008000 +loadaddr-$(CONFIG_MACH_KOTA2) += 0x41008000 +loadaddr-$(CONFIG_MACH_KZM9D) += 0x40008000 +loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 +loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 +loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000 +loadaddr-$(CONFIG_MACH_MACKEREL) += 0x40008000 +loadaddr-$(CONFIG_MACH_MARZEN) += 0x60008000 +loadaddr-$(CONFIG_MACH_MARZEN_REFERENCE) += 0x60008000 +__ZRELADDR := $(sort $(loadaddr-y)) zreladdr-y += $(__ZRELADDR) # Unsupported legacy stuff