From patchwork Sat Mar 5 17:30:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 592425 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 EE784140216 for ; Sun, 6 Mar 2016 04:31:44 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1C3D3A7651; Sat, 5 Mar 2016 18:31:38 +0100 (CET) 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 30RySbAGdNL0; Sat, 5 Mar 2016 18:31:38 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3BF2BA7690; Sat, 5 Mar 2016 18:31:34 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 82D8DA748F for ; Sat, 5 Mar 2016 18:31:28 +0100 (CET) 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 ufn6KM9UxF3R for ; Sat, 5 Mar 2016 18:31: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 avon.wwwdotorg.org (avon.wwwdotorg.org [70.85.31.133]) by theia.denx.de (Postfix) with ESMTPS id 38A32A75E5 for ; Sat, 5 Mar 2016 18:31:25 +0100 (CET) Received: from sprint.lan.foxrun.wwwdotorg.org (c-73-181-65-182.hsd1.co.comcast.net [73.181.65.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPSA id F08C81C02B6; Sat, 5 Mar 2016 10:31:22 -0700 (MST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.99 at avon.wwwdotorg.org From: Stephen Warren To: Tom Rini Date: Sat, 5 Mar 2016 10:30:53 -0700 Message-Id: <1457199053-23395-2-git-send-email-swarren@wwwdotorg.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1457199053-23395-1-git-send-email-swarren@wwwdotorg.org> References: <1457199053-23395-1-git-send-email-swarren@wwwdotorg.org> X-NVConfidentiality: public Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH V2 2/2] malloc: remove !gd handling X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Following the previous patch, malloc() is never called before gd is set, so we can remove the special-case check for this condition. This reverts commit 854d2b9753e4 "dlmalloc: ensure gd is set for early alloc". Cc: Rabin Vincent Signed-off-by: Stephen Warren Reviewed-by: Tom Rini Reviewed-by: Simon Glass --- common/dlmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/dlmalloc.c b/common/dlmalloc.c index 5ea37dfb6e4c..d66e80c647ce 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -2184,7 +2184,7 @@ Void_t* mALLOc(bytes) size_t bytes; INTERNAL_SIZE_T nb; #ifdef CONFIG_SYS_MALLOC_F_LEN - if (gd && !(gd->flags & GD_FLG_FULL_MALLOC_INIT)) + if (!(gd->flags & GD_FLG_FULL_MALLOC_INIT)) return malloc_simple(bytes); #endif