From patchwork Sat Oct 13 04:53:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Rowand X-Patchwork-Id: 10639923 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D39AA13AD for ; Sat, 13 Oct 2018 04:56:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C31412B524 for ; Sat, 13 Oct 2018 04:56:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B73772B541; Sat, 13 Oct 2018 04:56:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 693E52B524 for ; Sat, 13 Oct 2018 04:56:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726774AbeJMMay (ORCPT ); Sat, 13 Oct 2018 08:30:54 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44980 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726031AbeJMMax (ORCPT ); Sat, 13 Oct 2018 08:30:53 -0400 Received: by mail-pf1-f193.google.com with SMTP id r9-v6so7148478pff.11; Fri, 12 Oct 2018 21:55:12 -0700 (PDT) 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=Y8f+zX4OUAoqVg/3NA0TrDwr4Zjok9K4JF3715XNZDg=; b=TN0C2NGhYjK88hDnYMJu04tPsvFFVQF89aayf5OmNyzWECQvEkD9ulD0urAGCZP40I 5fptg6J9R/ZumR/RQz/ABDlVWOXynH/hsJuzy4xE4l4aggHZYuslxbeEzDK7Ncw1bx0o d+6OuWgSdHZYvNw4OAgPK8BbD5AkaRyJvyTcY1H1LToN61kZXEfrnNqpLwq6BXuWUDfh T8mHJ2+ti0xk2gTVmR3tgGIcyOOfivfQae6ymBFUT8aZdJY2ZjDcqwZS085aKyrJVfWk u4Sz3n6iKFyfDqxdzcZQY8hWUN2opLuOSIq4Gr3jHfBQAJeWAObvyUo8ErSXj5eDR41/ 453g== 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=Y8f+zX4OUAoqVg/3NA0TrDwr4Zjok9K4JF3715XNZDg=; b=B0mCuWEazXrSCCk+6ajk/ERnE5L/clVavYn92leDxUgZ6J/QOl7IZCBQvn7hHRmybc iG2pk5h3JYANwMAkZozJV6zlmdEpKdLtVXW4+HEHzVATYeL33YvaqLzmJHwBqtzfS+BD wQahKP445MEJEh5rA9Rfw+eX9UKUpyIp0keRCkxxytxMDVnR2gAMACXrx98gZyc2eO/f h35B7Zj0flXiiA+oxU+mz5bzmILfaFQBzGBn8hQnxjIh8R5UScFPWSdDKEoPvJWsvW3v INATGboUjpijAt8oPnr8bjFpVTuwGq+P/lsgERnYdPj72J4fwPEYN/ddQ7PKO1XNyvda 08qQ== X-Gm-Message-State: ABuFfogCUHipAASJQs1s3BmUL4/YF5v3nPyPUYhyUWKkXW+zYw1Rr9Yt sCFVe7OlAUBWFZvGI9DNfZg= X-Google-Smtp-Source: ACcGV63QjsrJbRwU5cAl0MzKeHSMW/wwfoQ5OxrsVSViU8k1wPBAVs/y59uPeF9znxjnDgYruHnI7g== X-Received: by 2002:a63:78cc:: with SMTP id t195-v6mr8146071pgc.329.1539406512206; Fri, 12 Oct 2018 21:55:12 -0700 (PDT) Received: from localhost.localdomain (c-24-6-192-50.hsd1.ca.comcast.net. [24.6.192.50]) by smtp.gmail.com with ESMTPSA id h87-v6sm6959462pfj.78.2018.10.12.21.55.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Oct 2018 21:55:11 -0700 (PDT) From: frowand.list@gmail.com To: Rob Herring , Pantelis Antoniou , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Alan Tull , Moritz Fischer Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, linux-fpga@vger.kernel.org Subject: [PATCH v2 06/18] of: overlay: do not duplicate properties from overlay for new nodes Date: Fri, 12 Oct 2018 21:53:26 -0700 Message-Id: <1539406418-18162-7-git-send-email-frowand.list@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1539406418-18162-1-git-send-email-frowand.list@gmail.com> References: <1539406418-18162-1-git-send-email-frowand.list@gmail.com> Sender: linux-fpga-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fpga@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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 94740f4ee34c..7fcf4a812d06 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;