Re: [PATCH v3 1/4] of: change overlay apply input data from unflattened to FDT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Frank,

I love your patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.16-rc1 next-20180216]
[cannot apply to glikely/devicetree/next]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/frowand-list-gmail-com/of-change-overlay-apply-input-data-from-unflattened/20180218-095108
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: i386-randconfig-x018-201807 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/of/overlay.c: In function 'of_overlay_fdt_apply':
>> drivers/of/overlay.c:832:2: error: implicit declaration of function 'of_fdt_unflatten_tree' [-Werror=implicit-function-declaration]
     of_fdt_unflatten_tree(new_fdt, NULL, &overlay_root);
     ^~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/of_fdt_unflatten_tree +832 drivers/of/overlay.c

   806	
   807	int of_overlay_fdt_apply(void *overlay_fdt, int *ovcs_id)
   808	{
   809		const void *new_fdt;
   810		int ret;
   811		u32 size;
   812		struct device_node *overlay_root;
   813	
   814		*ovcs_id = 0;
   815		ret = 0;
   816	
   817		if (fdt_check_header(overlay_fdt)) {
   818			pr_err("Invalid overlay_fdt header\n");
   819			return -EINVAL;
   820		}
   821	
   822		size = fdt_totalsize(overlay_fdt);
   823	
   824		/*
   825		 * Must create permanent copy of FDT because of_fdt_unflatten_tree()
   826		 * will create pointers to the passed in FDT in the unflattened tree.
   827		 */
   828		new_fdt = kmemdup(overlay_fdt, size, GFP_KERNEL);
   829		if (!new_fdt)
   830			return -ENOMEM;
   831	
 > 832		of_fdt_unflatten_tree(new_fdt, NULL, &overlay_root);
   833		if (!overlay_root) {
   834			pr_err("unable to unflatten overlay_fdt\n");
   835			ret = -EINVAL;
   836			goto out_free_new_fdt;
   837		}
   838	
   839		ret = of_overlay_apply(new_fdt, overlay_root, ovcs_id);
   840		if (ret < 0) {
   841			/*
   842			 * new_fdt and overlay_root now belong to the overlay
   843			 * changeset.
   844			 * overlay changeset code is responsible for freeing them.
   845			 */
   846			goto out;
   847		}
   848	
   849		return 0;
   850	
   851	
   852	out_free_new_fdt:
   853		kfree(new_fdt);
   854	
   855	out:
   856		return ret;
   857	}
   858	EXPORT_SYMBOL_GPL(of_overlay_fdt_apply);
   859	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux