From patchwork Tue May 7 16:11:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 242397 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 728072C0180 for ; Wed, 8 May 2013 02:14:50 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 450324A1CE; Tue, 7 May 2013 18:14:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KkE-pz3OmMJJ; Tue, 7 May 2013 18:14:20 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BECB14A214; Tue, 7 May 2013 18:13:01 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2DE444A1A8 for ; Tue, 7 May 2013 18:12:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 32ZpkepZjgqj for ; Tue, 7 May 2013 18:12:48 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 BL_NJABL=ERR(-1.5) (only DNSBL check requested) Received: from mail-ye0-f201.google.com (mail-ye0-f201.google.com [209.85.213.201]) by theia.denx.de (Postfix) with ESMTPS id 9CB5B4A1EB for ; Tue, 7 May 2013 18:12:20 +0200 (CEST) Received: by mail-ye0-f201.google.com with SMTP id m14so72429yen.4 for ; Tue, 07 May 2013 09:12:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=RUk1tl/kIrIG7e5/tMeh/qCdzqjA9vxJg6sgB5jDqfU=; b=CGO57JUQPe4YNJDpIE0ufCpEFm05QV6cU/ez2FqgujBPx1ME7lYZYjaIxvW+T+Xq7E v/VVnA6apQXswckQybjU09TKF9Akilsg9pyPWvODURnNf3SEaosOb71pdj/GGiuvcHHl NrXuWLeWMErOBbLb3ONJT991XV0Q6Q+96JzC9reOOpZo2GjOqOu7PAPjCCuU8SDj5gUG 1XY0l/a3tlx/gfxpJGmuVJ/x7EN1FPxQBujZ1TG0z2ptfk0X9YvIN+P2IcV4K03exKwI ZdUzx19bORx1RlTFVipJsDGHGIMC33En3jkG17A+4Xsd7KxrbA7YpAd4H4Ow30wFRqME daAA== X-Received: by 10.236.128.207 with SMTP id f55mr1712145yhi.28.1367943139980; Tue, 07 May 2013 09:12:19 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id q46si3005742yhh.4.2013.05.07.09.12.19 for (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Tue, 07 May 2013 09:12:19 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.83.1]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id CA2EC5A4228; Tue, 7 May 2013 09:12:19 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 879C916073A; Tue, 7 May 2013 09:12:19 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Tue, 7 May 2013 09:11:49 -0700 Message-Id: <1367943123-16013-6-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1367943123-16013-1-git-send-email-sjg@chromium.org> References: <1367943123-16013-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQmgQIVp8nepyIGQRWvkHhAtMx+uLbJ7lLYzOo5TQNnhDHyqEha3xbDzV0EtNiczPv1iv4WiGV6x3ppTmy8FNljrrOCs693mjx46i1qFnmyLJPDOS2RK3gLBQAFi3Piojph+bbfls7luJz9E0FZViwhzBRaDDTtLTOFvahFLrrfNKhKo9i6Rs140f57GOwoNXfoFteRL Cc: Tom Rini , Joe Hershberger , u-boot-review@google.com Subject: [U-Boot] [PATCH v4 05/19] mkimage: Move ARRAY_SIZE to header file X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Move this definition from aisimage.c to mkimage.h so that it is available more widely. Signed-off-by: Simon Glass Acked-by: Marek Vasut --- Changes in v4: None Changes in v3: None Changes in v2: None tools/aisimage.c | 1 - tools/mkimage.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/aisimage.c b/tools/aisimage.c index c645708..659df8c 100644 --- a/tools/aisimage.c +++ b/tools/aisimage.c @@ -32,7 +32,6 @@ #define WORD_ALIGN0 4 #define WORD_ALIGN(len) (((len)+WORD_ALIGN0-1) & ~(WORD_ALIGN0-1)) #define MAX_CMD_BUFFER 4096 -#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) static uint32_t ais_img_size; diff --git a/tools/mkimage.h b/tools/mkimage.h index ea45f5c..e07a615 100644 --- a/tools/mkimage.h +++ b/tools/mkimage.h @@ -42,6 +42,8 @@ #define debug(fmt,args...) #endif /* MKIMAGE_DEBUG */ +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + #define MKIMAGE_TMPFILE_SUFFIX ".tmp" #define MKIMAGE_MAX_TMPFILE_LEN 256 #define MKIMAGE_DEFAULT_DTC_OPTIONS "-I dts -O dtb -p 500"