From patchwork Mon Nov 5 15:25:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Rowand X-Patchwork-Id: 993187 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42pcQv38pyz9sCs for ; Tue, 6 Nov 2018 02:43:35 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FZFsW05K"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42pcQv1CgNzF1XK for ; Tue, 6 Nov 2018 02:43:35 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com 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="FZFsW05K"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::442; helo=mail-pf1-x442.google.com; envelope-from=frowand.list@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FZFsW05K"; dkim-atps=neutral Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) (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 42pc3p1RWMzDrL6 for ; Tue, 6 Nov 2018 02:27:01 +1100 (AEDT) Received: by mail-pf1-x442.google.com with SMTP id x2-v6so504686pfm.7 for ; Mon, 05 Nov 2018 07:27:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mDWmpK0OiVEqlMHbao8c5fx+Nz1R8IrIrFeiQ9xLgiE=; b=FZFsW05K2i5M+UoXuDDE/DtreQnnw2El3l3uZWE+PB0q8LzUYY18T/k5+ewDoYZvoz HUovE3w6jDvxZBDhB3noInGYzc/sAm7m3Cpv44DpmOdl4PCuL2OYH/oDI2xh28ubeDwU FPM1rDG/6FmT8deFdkRiOCTe6M1Jz++Nikz3GSKxu/X9DjoA3VXDprP4auTV2Acu7LlW f2StjqATKDh/QgNE8t7LLFN6ahEwEk+B7+T6SgsBJHhuqPpOq70gvEqtRwG7rP0Zmi8W vvLu5w01mryA7h/fiXomLpVz/epvd9L29cQzlx0Q2ZzddUvWSomwAF5kOHQsH44L6znw S8fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mDWmpK0OiVEqlMHbao8c5fx+Nz1R8IrIrFeiQ9xLgiE=; b=Enm/jdQeOGnBNiUfYEn8+OH+Nq3+W5IxUwGYCOxY2Wt+OVAskwKxsnG76UCRlzI7dc nAbgkN7IScTC2MmKQStCJgZIFdJDKXzj6pMt151PbL+Se43xUhIvCDZmvgiULbkPtHlL h/bIglvyNO1H4UJVNL/k7D0iLVGWvtRY5vx/J3qr6WTU8AFImPbRe+7zbztPaXvsZCAA B4VpBeb+MUpO+KYjKxsBNgTqlLsDEXzmvVKcf8oFPNe0Sapbr6nHTEttLjmSm9MpADgr NGajdoibTJd6mrhWn4AulYVc3gRaTNZjwvx5DhroeayojKVeeySETY0uo+hig0NZefQR 3D8w== X-Gm-Message-State: AGRZ1gIRL86p2jmYLKUPkRltJnj0zClvgxFnHP4HR9QiCKQjvtVf4HTQ mMiU72d68wNeTVXXnp6bRHc= X-Google-Smtp-Source: AJdET5eEYAn10mFPvXv4Ix+DIBhe+L9mdmAMLibh6DXt7QRmQdcO6vF+8xzTs7Z1Xkmjwug5EQcXgQ== X-Received: by 2002:a62:4301:: with SMTP id q1-v6mr21923331pfa.163.1541431620374; Mon, 05 Nov 2018 07:27:00 -0800 (PST) Received: from localhost.localdomain (c-24-6-192-50.hsd1.ca.comcast.net. [24.6.192.50]) by smtp.gmail.com with ESMTPSA id u76-v6sm37260578pfa.176.2018.11.05.07.26.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Nov 2018 07:26:59 -0800 (PST) From: frowand.list@gmail.com To: Rob Herring , Pantelis Antoniou , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Alan Tull , Moritz Fischer Subject: [PATCH v6 06/18] of: overlay: do not duplicate properties from overlay for new nodes Date: Mon, 5 Nov 2018 07:25:03 -0800 Message-Id: <1541431515-25197-7-git-send-email-frowand.list@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1541431515-25197-1-git-send-email-frowand.list@gmail.com> References: <1541431515-25197-1-git-send-email-frowand.list@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-fpga@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Frank Rowand When allocating a new node, add_changeset_node() was duplicating the properties from the respective node in the overlay instead of allocating a node with no properties. When this patch is applied the errors reported by the devictree unittest from patch "of: overlay: add tests to validate kfrees from overlay removal" will no longer occur. These error messages are of the form: "OF: ERROR: ..." and the unittest results will change from: ### dt-test ### end of unittest - 203 passed, 7 failed to ### dt-test ### end of unittest - 210 passed, 0 failed Tested-by: Alan Tull Signed-off-by: Frank Rowand --- drivers/of/overlay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 6fd8e6145e10..9808aae4621a 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -393,7 +393,7 @@ static int add_changeset_node(struct overlay_changeset *ovcs, break; if (!tchild) { - tchild = __of_node_dup(node, node_kbasename); + tchild = __of_node_dup(NULL, node_kbasename); if (!tchild) return -ENOMEM;