From patchwork Mon Mar 18 23:51:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 228849 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 748512C00BC for ; Tue, 19 Mar 2013 10:56:49 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C52274A057; Tue, 19 Mar 2013 00:55:50 +0100 (CET) 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 VNSQ59y2JMM2; Tue, 19 Mar 2013 00:55:50 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 065DB4A0EC; Tue, 19 Mar 2013 00:54:03 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B34214A03C for ; Tue, 19 Mar 2013 00:53:29 +0100 (CET) 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 dYhgRe2ezz2Q for ; Tue, 19 Mar 2013 00:53:28 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ve0-f201.google.com (mail-ve0-f201.google.com [209.85.128.201]) by theia.denx.de (Postfix) with ESMTPS id 4C9CE4A02A for ; Tue, 19 Mar 2013 00:53:19 +0100 (CET) Received: by mail-ve0-f201.google.com with SMTP id 14so640742vea.0 for ; Mon, 18 Mar 2013 16:53:17 -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=qqjnKehgjAFKRZHqjFt17ndGYWqY9On4rJJdJOgidp0=; b=QBf843HOBw47wOI5btj/VtTIjIK4v8vZUILH+VBfsKgyTH89s0BUPakh8Ze/lqZUQ7 3OrChnMFHxxXsbxZBfnkblGl2C9C7i2JnCW9o2F86u6hxPb2JfcvXBv2YzD4PbzlEhlH AfVkiiYT0btoq6u/jAxxwydpTU8vSvjx9lh2r9D4tRemkiLWYrOgHEL1kpoKA6gupbOm 6ZaMuYds2UYOz6LnaCLNWBzXS9T270rVHocES1MxGxUDqGgaLF0kx5Ga+YwypcKc+9Nv mzp3NaJ3l3AS1ke+CBuy76uxIvbEJnpR0uZf1xiRIY2bm/qhCgvQFW58ahouCNDhK4TG /e2A== X-Received: by 10.52.27.6 with SMTP id p6mr13308495vdg.0.1363650797817; Mon, 18 Mar 2013 16:53:17 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id f64si2188142yhj.7.2013.03.18.16.53.17 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Mon, 18 Mar 2013 16:53:17 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id A262E31C00F; Mon, 18 Mar 2013 16:53:17 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 5411016036D; Mon, 18 Mar 2013 16:53:17 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 18 Mar 2013 16:51:23 -0700 Message-Id: <1363650725-30459-4-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.8.1.3 In-Reply-To: <1363650725-30459-1-git-send-email-sjg@chromium.org> References: <1363650725-30459-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQlXx5DMfs66LPy0Ql8ry3FchG67TQV/FPcuQKi3qudDlBewtxtk5W5cwSj75osc/nU7oK4jSqIf+TNqyu0WwyT7rW37ADlUf2dEnnhM06jb3fTOFGYbRpQ6qmd+r0wzvgCckQhBXmb3NevGxQX0V9kfMQO5R3hvH0cXgZZ4iOD8+vZ3PSDqo3hwL5RgZMT8+/wnZajf Cc: Joel A Fernandes , Will Drewry , Joe Hershberger , u-boot-review@google.com, Bill Richardson , Randall Spangler , Tom Rini , Vadim Bendebury , =?UTF-8?q?Andreas=20B=C3=A4ck?= , Kees Cook Subject: [U-Boot] [PATCH v2 03/45] 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 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"