tree: https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git topic/renesas-overlays head: 1b3280e42a0063f04f3ab7c9f8bbe4b5c65c51d9 commit: a9f6ad767d6992a45c4d7ff331f6e796efe78d4d [17/88] of: unittest: Unit-tests for target root overlays. config: xtensa-allmodconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 4.9.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout a9f6ad767d6992a45c4d7ff331f6e796efe78d4d # save the attached .config to linux build tree make.cross ARCH=xtensa
All errors (new ones prefixed by >>):
drivers/of/unittest.c: In function 'of_unittest_overlay_16':
drivers/of/unittest.c:1970:2: error: implicit declaration of function
'of_overlay_create_indirect' [-Werror=implicit-function-declaration]
ret = of_overlay_create_indirect(np, "unittest16");
^
drivers/of/unittest.c: In function 'of_unittest_overlay_17':
>> drivers/of/unittest.c:2037:2: error: implicit declaration of function
>> 'of_overlay_create_target_root' [-Werror=implicit-function-declaration]
ret = of_overlay_create_target_root(np, target_root);
^
cc1: some warnings being treated as errors
vim +/of_overlay_create_target_root +2037 drivers/of/unittest.c
1941
1942 static void of_unittest_overlay_16(void)
1943 {
1944 int ret;
1945 int overlay_nr = 16;
1946 int unittest_nr = 16;
1947 enum overlay_type ovtype = PDEV_OVERLAY;
1948 int before = 0;
1949 int after = 1;
1950 struct device_node *np = NULL;
1951 int id = -1;
1952
1953 /* unittest device must not be in before state */
1954 if (of_unittest_device_exists(unittest_nr, ovtype) != before) {
1955 unittest(0, "overlay @\"%s\" with device @\"%s\" %s\n",
1956 overlay_path(overlay_nr),
1957 unittest_path(unittest_nr, ovtype),
1958 !before ? "enabled" : "disabled");
1959 return;
1960 }
1961
1962 np = of_find_node_by_path(overlay_path(overlay_nr));
1963 if (np == NULL) {
1964 unittest(0, "could not find overlay node @\"%s\"\n",
1965 overlay_path(overlay_nr));
1966 ret = -EINVAL;
1967 goto out;
1968 }
1969
> 1970 ret = of_overlay_create_indirect(np, "unittest16");
1971 if (ret < 0) {
1972 unittest(0, "could not create overlay from \"%s\"\n",
1973 overlay_path(overlay_nr));
1974 goto out;
1975 }
1976 id = ret;
1977 of_unittest_track_overlay(id);
1978
1979 ret = 0;
1980
1981 out:
1982 of_node_put(np);
1983
1984 if (ret)
1985 return;
1986
1987 /* unittest device must be to set to after state */
1988 if (of_unittest_device_exists(unittest_nr, ovtype) != after) {
1989 unittest(0, "overlay @\"%s\" failed to create @\"%s\"
%s\n",
1990 overlay_path(overlay_nr),
1991 unittest_path(unittest_nr, ovtype),
1992 !after ? "enabled" : "disabled");
1993 return;
1994 }
1995
1996 unittest(1, "overlay test %d passed\n", 16);
1997 }
1998
1999 static void of_unittest_overlay_17(void)
2000 {
2001 int ret;
2002 int overlay_nr = 17;
2003 int unittest_nr = 17;
2004 enum overlay_type ovtype = PDEV_OVERLAY;
2005 int before = 0;
2006 int after = 1;
2007 const char *root_path;
2008 struct device_node *np = NULL, *target_root = NULL;
2009 int id = -1;
2010
2011 /* unittest device must not be in before state */
2012 if (of_unittest_device_exists(unittest_nr, ovtype) != before) {
2013 unittest(0, "overlay @\"%s\" with device @\"%s\" %s\n",
2014 overlay_path(overlay_nr),
2015 unittest_path(unittest_nr, ovtype),
2016 !before ? "enabled" : "disabled");
2017 return;
2018 }
2019
2020 np = of_find_node_by_path(overlay_path(overlay_nr));
2021 if (np == NULL) {
2022 unittest(0, "could not find overlay node @\"%s\"\n",
2023 overlay_path(overlay_nr));
2024 ret = -EINVAL;
2025 goto out;
2026 }
2027
2028 root_path =
"/testcase-data/overlay-node/test-bus/test-unittest17";
2029 target_root = of_find_node_by_path(root_path);
2030 if (!target_root) {
2031 unittest(0, "could not find target_root node @\"%s\"\n",
2032 root_path);
2033 ret = -EINVAL;
2034 goto out;
2035 }
2036
> 2037 ret = of_overlay_create_target_root(np, target_root);
2038 of_node_put(target_root);
2039
2040 if (ret < 0) {
2041 unittest(0, "could not create overlay from \"%s\"\n",
2042 overlay_path(overlay_nr));
2043 goto out;
2044 }
2045 id = ret;
2046 of_unittest_track_overlay(id);
2047
2048 ret = 0;
2049
2050 out:
2051 of_node_put(np);
2052
2053 if (ret)
2054 return;
2055
2056 /* unittest device must be to set to after state */
2057 if (of_unittest_device_exists(unittest_nr, ovtype) != after) {
2058 unittest(0, "overlay @\"%s\" failed to create @\"%s\"
%s\n",
2059 overlay_path(overlay_nr),
2060 unittest_path(unittest_nr, ovtype),
2061 !after ? "enabled" : "disabled");
2062 return;
2063 }
2064
2065 unittest(1, "overlay test %d passed\n", 17);
2066 }
2067
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip
