unittest.c (a4f91f0de905dd6f91ab12dd8bfda10317fa43eb) unittest.c (b89dae1852869d6bb3e4a8e3c6bdaf86dc2ef9da)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Self tests for device tree subsystem
4 */
5
6#define pr_fmt(fmt) "### dt-test ### " fmt
7
8#include <linux/bootmem.h>

--- 678 unchanged lines hidden (view full) ---

687 struct property *ppname_n1, pname_n1 = { .name = "name", .length = 3, .value = "n1" };
688 struct property *ppname_n2, pname_n2 = { .name = "name", .length = 3, .value = "n2" };
689 struct property *ppname_n21, pname_n21 = { .name = "name", .length = 3, .value = "n21" };
690 struct property *ppupdate, pupdate = { .name = "prop-update", .length = 5, .value = "abcd" };
691 struct property *ppremove;
692 struct device_node *n1, *n2, *n21, *nchangeset, *nremove, *parent, *np;
693 struct of_changeset chgset;
694
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Self tests for device tree subsystem
4 */
5
6#define pr_fmt(fmt) "### dt-test ### " fmt
7
8#include <linux/bootmem.h>

--- 678 unchanged lines hidden (view full) ---

687 struct property *ppname_n1, pname_n1 = { .name = "name", .length = 3, .value = "n1" };
688 struct property *ppname_n2, pname_n2 = { .name = "name", .length = 3, .value = "n2" };
689 struct property *ppname_n21, pname_n21 = { .name = "name", .length = 3, .value = "n21" };
690 struct property *ppupdate, pupdate = { .name = "prop-update", .length = 5, .value = "abcd" };
691 struct property *ppremove;
692 struct device_node *n1, *n2, *n21, *nchangeset, *nremove, *parent, *np;
693 struct of_changeset chgset;
694
695 n1 = __of_node_dup(NULL, "/testcase-data/changeset/n1");
695 n1 = __of_node_dup(NULL, "n1");
696 unittest(n1, "testcase setup failure\n");
697
696 unittest(n1, "testcase setup failure\n");
697
698 n2 = __of_node_dup(NULL, "/testcase-data/changeset/n2");
698 n2 = __of_node_dup(NULL, "n2");
699 unittest(n2, "testcase setup failure\n");
700
699 unittest(n2, "testcase setup failure\n");
700
701 n21 = __of_node_dup(NULL, "%s/%s", "/testcase-data/changeset/n2", "n21");
701 n21 = __of_node_dup(NULL, "n21");
702 unittest(n21, "testcase setup failure %p\n", n21);
703
704 nchangeset = of_find_node_by_path("/testcase-data/changeset");
705 nremove = of_get_child_by_name(nchangeset, "node-remove");
706 unittest(nremove, "testcase setup failure\n");
707
708 ppadd = __of_prop_dup(&padd, GFP_KERNEL);
709 unittest(ppadd, "testcase setup failure\n");

--- 1819 unchanged lines hidden ---
702 unittest(n21, "testcase setup failure %p\n", n21);
703
704 nchangeset = of_find_node_by_path("/testcase-data/changeset");
705 nremove = of_get_child_by_name(nchangeset, "node-remove");
706 unittest(nremove, "testcase setup failure\n");
707
708 ppadd = __of_prop_dup(&padd, GFP_KERNEL);
709 unittest(ppadd, "testcase setup failure\n");

--- 1819 unchanged lines hidden ---