From patchwork Mon Mar 18 23:52:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 228882 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 3F7F92C00A7 for ; Tue, 19 Mar 2013 11:06:35 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B8B7E4A118; Tue, 19 Mar 2013 01:02:06 +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 JJ+bE3B9IKz8; Tue, 19 Mar 2013 01:02:06 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 754964A1D6; Tue, 19 Mar 2013 00:55:45 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A0FFB4A156 for ; Tue, 19 Mar 2013 00:54:26 +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 nGyCBFgcz3tZ for ; Tue, 19 Mar 2013 00:54:24 +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-ye0-f201.google.com (mail-ye0-f201.google.com [209.85.213.201]) by theia.denx.de (Postfix) with ESMTPS id D03B94A0A5 for ; Tue, 19 Mar 2013 00:53:24 +0100 (CET) Received: by mail-ye0-f201.google.com with SMTP id m12so638555yen.2 for ; Mon, 18 Mar 2013 16:53:23 -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=Tt8sDJY/kiBdVQ1qLKkRYpsggv3UQ4b/BSzHfbkMHLc=; b=LcODML9VUkuZ2g7CZRV7shZtoEUg5b9tP0gXGd5wbvYRVzx/DitFeJE2nWtiEFnmEZ KfqpICcUhgGqmqIJpiCL4Lxh1VUrYyx9EqRn3TdJtlMLZ8PijeX2cLounlB09dYbyCFr 2ULMaKTYZR2HFBzpZnDM2UE/A2IUSUiVF2ks3adESbpvd4azY+FPl/rxc+Ti8k8Bw10G RwxAYa8/c1liiCwvvb7Iz4bjvedi525IL1YQ1dBcfLL+zhrDcsS3DjW5Y/mmDa97QEuj zKauoBq/h8NKJ7pqoNvwE1xFOUxwdIZXTZuSrGi8lg3O0dU19Jr2rAGUl6VQlP+bnxT2 A2SQ== X-Received: by 10.52.17.102 with SMTP id n6mr13282438vdd.8.1363650803362; Mon, 18 Mar 2013 16:53:23 -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 b67si2189803yhi.2.2013.03.18.16.53.23 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Mon, 18 Mar 2013 16:53:23 -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 34C7231C00F; Mon, 18 Mar 2013 16:53:23 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 13B8D160341; Mon, 18 Mar 2013 16:53:23 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 18 Mar 2013 16:52:02 -0700 Message-Id: <1363650725-30459-43-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: ALoCoQktiKLt8VqhPD8y7TQ4HBmfSLDvYQhyymdlvRXR3T9DRnuM8cWyDO8FmhqvfLDfo0mEDE5uG8Zrq7zDv1jkdEzONrkV3aq82qsfvVNovzwdByxPOj0+NVPSlORN1pKQrIX2/3QEMRNu5ykAXmOlHSGKzLWxBEKtuCz8qf7wUTC5+BIzZ90WHgERPQZSR7OLMIvSae0E 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 42/45] image: Remove remaining #ifdefs in image-fit.c 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 There are only two left. One is unnecessary and the other can be moved to the header file. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to remove #ifdefs in image-fit.c common/image-fit.c | 9 ++------- common/image.c | 7 +------ include/image.h | 2 ++ 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/common/image-fit.c b/common/image-fit.c index 30790d3..29ea4c9 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -151,11 +151,8 @@ void fit_print_contents(const void *fit) const char *p; time_t timestamp; -#ifdef USE_HOSTCC - p = ""; -#else - p = " "; -#endif + /* Indent string is defined in header image.h */ + p = IMAGE_INDENT_STRING; /* Root node properties */ ret = fit_get_desc(fit, 0, &desc); @@ -1504,7 +1501,6 @@ void fit_conf_print(const void *fit, int noffset, const char *p) * 1, on success * 0, on failure */ -#ifndef USE_HOSTCC int fit_check_ramdisk(const void *fit, int rd_noffset, uint8_t arch, int verify) { @@ -1533,4 +1529,3 @@ int fit_check_ramdisk(const void *fit, int rd_noffset, uint8_t arch, bootstage_mark(BOOTSTAGE_ID_FIT_RD_CHECK_ALL_OK); return 1; } -#endif /* USE_HOSTCC */ diff --git a/common/image.c b/common/image.c index 14d1c48..f013fdc 100644 --- a/common/image.c +++ b/common/image.c @@ -295,12 +295,7 @@ void image_print_contents(const void *ptr) const image_header_t *hdr = (const image_header_t *)ptr; const char *p; -#ifdef USE_HOSTCC - p = ""; -#else - p = " "; -#endif - + p = IMAGE_INDENT_STRING; printf("%sImage Name: %.*s\n", p, IH_NMLEN, image_get_name(hdr)); if (IMAGE_ENABLE_TIMESTAMP) { printf("%sCreated: ", p); diff --git a/include/image.h b/include/image.h index cbbc17e..5766b58 100644 --- a/include/image.h +++ b/include/image.h @@ -47,6 +47,7 @@ #define CONFIG_FIT_SIGNATURE #define IMAGE_ENABLE_IGNORE 0 +#define IMAGE_INDENT_STRING "" #else @@ -56,6 +57,7 @@ /* Take notice of the 'ignore' property for hashes */ #define IMAGE_ENABLE_IGNORE 1 +#define IMAGE_INDENT_STRING " " #endif /* USE_HOSTCC */