From patchwork Thu Jun 13 13:10:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 2716091 X-Patchwork-Delegate: lethal@linux-sh.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6C9769F3B5 for ; Thu, 13 Jun 2013 13:11:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D71120155 for ; Thu, 13 Jun 2013 13:11:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 590F02018C for ; Thu, 13 Jun 2013 13:11:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756404Ab3FMNLP (ORCPT ); Thu, 13 Jun 2013 09:11:15 -0400 Received: from juliette.telenet-ops.be ([195.130.137.74]:36025 "EHLO juliette.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755225Ab3FMNLN (ORCPT ); Thu, 13 Jun 2013 09:11:13 -0400 Received: from ayla.of.borg ([84.193.72.141]) by juliette.telenet-ops.be with bizsmtp id npB81l00N32ts5g06pB89j; Thu, 13 Jun 2013 15:11:11 +0200 Received: from geert by ayla.of.borg with local (Exim 4.71) (envelope-from ) id 1Un7Iy-0008Fe-7G; Thu, 13 Jun 2013 15:11:08 +0200 From: Geert Uytterhoeven To: Yoshinori Sato , Simon Horman , Magnus Damm , Russell King , Paul Mundt Cc: 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, Geert Uytterhoeven Subject: [PATCH 3/3] sh/boot: Use POSIX "$((..))" instead of bashism "$[...]" Date: Thu, 13 Jun 2013 15:10:52 +0200 Message-Id: <1371129052-31506-4-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1371129052-31506-1-git-send-email-geert@linux-m68k.org> References: <1371129052-31506-1-git-send-email-geert@linux-m68k.org> 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 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/sh/boot/Makefile | 24 ++++++++++++------------ arch/sh/boot/compressed/Makefile | 14 +++++++------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/arch/sh/boot/Makefile b/arch/sh/boot/Makefile index 4ab2ba5..e10fb9b 100644 --- a/arch/sh/boot/Makefile +++ b/arch/sh/boot/Makefile @@ -46,18 +46,18 @@ $(obj)/romImage: $(obj)/romimage/vmlinux FORCE $(obj)/romimage/vmlinux: $(obj)/zImage FORCE $(Q)$(MAKE) $(build)=$(obj)/romimage $@ -KERNEL_MEMORY := $(shell /bin/bash -c 'printf "0x%08x" \ - $$[$(CONFIG_PHYSICAL_START) & 0x1fffffff]') - -KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \ - $$[$(CONFIG_PAGE_OFFSET) + \ - $(KERNEL_MEMORY) + \ - $(CONFIG_ZERO_PAGE_OFFSET)]') - -KERNEL_ENTRY := $(shell /bin/bash -c 'printf "0x%08x" \ - $$[$(CONFIG_PAGE_OFFSET) + \ - $(KERNEL_MEMORY) + \ - $(CONFIG_ZERO_PAGE_OFFSET) + $(CONFIG_ENTRY_OFFSET)]') +KERNEL_MEMORY := $(shell printf "0x%08x" \ + $$(($(CONFIG_PHYSICAL_START) & 0x1fffffff))) + +KERNEL_LOAD := $(shell printf "0x%08x" \ + $$(($(CONFIG_PAGE_OFFSET) + \ + $(KERNEL_MEMORY) + \ + $(CONFIG_ZERO_PAGE_OFFSET)))) + +KERNEL_ENTRY := $(shell printf "0x%08x" \ + $$(($(CONFIG_PAGE_OFFSET) + \ + $(KERNEL_MEMORY) + \ + $(CONFIG_ZERO_PAGE_OFFSET) + $(CONFIG_ENTRY_OFFSET)))) UIMAGE_LOADADDR = $(KERNEL_LOAD) UIMAGE_ENTRYADDR = $(KERNEL_ENTRY) diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile index 43d1b9a..0330ba7 100644 --- a/arch/sh/boot/compressed/Makefile +++ b/arch/sh/boot/compressed/Makefile @@ -17,14 +17,14 @@ GCOV_PROFILE := n # IMAGE_OFFSET is the load offset of the compression loader # ifeq ($(CONFIG_32BIT),y) -IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \ - $$[$(CONFIG_MEMORY_START) + \ - $(CONFIG_BOOT_LINK_OFFSET)]') +IMAGE_OFFSET := $(shell printf "0x%08x" \ + $$(($(CONFIG_MEMORY_START) + \ + $(CONFIG_BOOT_LINK_OFFSET)))) else -IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \ - $$[$(CONFIG_PAGE_OFFSET) + \ - $(KERNEL_MEMORY) + \ - $(CONFIG_BOOT_LINK_OFFSET)]') +IMAGE_OFFSET := $(shell printf "0x%08x" \ + $$(($(CONFIG_PAGE_OFFSET) + \ + $(KERNEL_MEMORY) + \ + $(CONFIG_BOOT_LINK_OFFSET)))) endif ifeq ($(CONFIG_MCOUNT),y)