Message ID | 1473041269-21797-2-git-send-email-oohall@gmail.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sSCnW3Vm1z9sD5 for <incoming@patchwork.ozlabs.org>; Mon, 5 Sep 2016 12:08:31 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ggCA/rD5; dkim-atps=neutral Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3sSCnW2HDwzDrnD for <incoming@patchwork.ozlabs.org>; Mon, 5 Sep 2016 12:08:31 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ggCA/rD5; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mail-pa0-x241.google.com (mail-pa0-x241.google.com [IPv6:2607:f8b0:400e:c03::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3sSCn76dsXzDrht for <skiboot@lists.ozlabs.org>; Mon, 5 Sep 2016 12:08:11 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ggCA/rD5; dkim-atps=neutral Received: by mail-pa0-x241.google.com with SMTP id hm5so4022446pac.1 for <skiboot@lists.ozlabs.org>; Sun, 04 Sep 2016 19:08:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ra7GNru4zusiz0u1xxrRvVlSftrnqA+La405PczUhDQ=; b=ggCA/rD57WOCM0nOXlrA6M2HxK6yAL88BoTH0HIYaDL10fCg4GYYx+SB6yneXBxOrC 1MY6yBNtBnxArvf/3L0ObWk7nBc9QJCnrwXlyuAZZhxE9Ic/ye8g2Wv48ZnelfF+IJVe 8WHuhzaB6sR2dp0RL4vyB+vEQN5i+eS9C1p/9Qq8ctAQbOnQIIZKtBewgG3keYkoBSlO rAwblZDCIaJLJkJaF116HlQ5z2KzcP4ng1J65zag+tltZEz9d9W97JXw3zVZZogMm+AM 2kl3k+vCF3dsdrRuoqwEEInjxDnLYNIoDg3oQTASR0M0PeGm62MtE6lPyjxbt9V/IYCs qj0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ra7GNru4zusiz0u1xxrRvVlSftrnqA+La405PczUhDQ=; b=B/i2TFL03RLeszXgM5W9ceeyAaHQeZAWUhOVfwEBthrlpdVi0X9n+KZBc3bUtTxeP+ 4/Vc1pCdp97swYn2o/7cVwSphYf2bN05Tbv+TebPZwHMJ+RM0DWXAsgTX0vwH4ys5er7 UytQHcSVEdyZ4H7eVB7ShuxFcE7koaqZf0GpqnLx6dr+UzDRvAr2A1EpmgwjgSZBpMyg g5J9ccwBEzH/Gq/KEqwnD9ShH4ivnLWDKKdiGHFDlXwJ3Nyb2J5DfBQvBOZkrG+MOuk9 0zhWU1dl5obqg10OspQTWJHu2mwxfBnMUv7RhK+ENbqvPmL9r+aMf12Y6yIc/jQ0OIZT 3Uig== X-Gm-Message-State: AE9vXwMuVC8+xATafbOGo2EjORLvEvGwnpy0jhvFLCWqgUH822n3wiYuMoxz1xrCKGJVBg== X-Received: by 10.67.22.39 with SMTP id hp7mr50083790pad.19.1473041290226; Sun, 04 Sep 2016 19:08:10 -0700 (PDT) Received: from canetoad.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id o80sm29601029pfa.67.2016.09.04.19.08.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Sep 2016 19:08:09 -0700 (PDT) From: Oliver O'Halloran <oohall@gmail.com> To: skiboot@lists.ozlabs.org Date: Mon, 5 Sep 2016 12:07:48 +1000 Message-Id: <1473041269-21797-2-git-send-email-oohall@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1473041269-21797-1-git-send-email-oohall@gmail.com> References: <1473041269-21797-1-git-send-email-oohall@gmail.com> Subject: [Skiboot] [PATCH 2/3] core/vpd: remove realloc X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Mailing list for skiboot development <skiboot.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/skiboot/> List-Post: <mailto:skiboot@lists.ozlabs.org> List-Help: <mailto:skiboot-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> |
diff --git a/core/vpd.c b/core/vpd.c index d706b5575fd7..050bd42f7482 100644 --- a/core/vpd.c +++ b/core/vpd.c @@ -217,12 +217,6 @@ void vpd_iohub_load(struct dt_node *hub_node) printf("VPD: Loaded %zu bytes\n", vpd_size); - /* Got it ! */ - vpd = realloc(vpd, vpd_size); - - if (!vpd) - goto fail; - dt_add_property(hub_node, "ibm,io-vpd", vpd, vpd_size); free(vpd); return;
When setting up the VPD lid preload a buffer of VPD_LID_MAX_SIZE bytes is allocated. Once the lid has been transferred from the FSP this buffer is shrunk with realloc. However, the contents of the buffer are copied into the devicetree and the buffer is freed making the shrinking pointless. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> --- core/vpd.c | 6 ------ 1 file changed, 6 deletions(-)