Re: [PATCH v4 2/2] of: add early boot allocation of of_find_node_by_phandle() cache

[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-rc3 next-20180302]
[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-cache-phandle-nodes-to-reduce-cost-of-of_find_node_by_phandle/20180303-090055
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: tile-allmodconfig (attached as .config)
compiler: tilegx-linux-gcc (GCC) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=tile 

All errors (new ones prefixed by >>):

   drivers//of/base.c: In function 'of_core_init':
>> drivers//of/base.c:187:2: error: implicit declaration of function 'memblock_free'; did you mean 'ptlock_free'? [-Werror=implicit-function-declaration]
     memblock_free(__pa(phandle_cache), size);
     ^~~~~~~~~~~~~
     ptlock_free
   cc1: some warnings being treated as errors

vim +187 drivers//of/base.c

   178	
   179	void __init of_core_init(void)
   180	{
   181		unsigned long flags;
   182		struct device_node *np;
   183		phys_addr_t size;
   184	
   185		raw_spin_lock_irqsave(&devtree_lock, flags);
   186		size = (phandle_cache_mask + 1) * sizeof(*phandle_cache);
 > 187		memblock_free(__pa(phandle_cache), size);
   188		phandle_cache = NULL;
   189		raw_spin_unlock_irqrestore(&devtree_lock, flags);
   190	
   191		of_populate_phandle_cache();
   192	
   193		/* Create the kset, and register existing nodes */
   194		mutex_lock(&of_mutex);
   195		of_kset = kset_create_and_add("devicetree", NULL, firmware_kobj);
   196		if (!of_kset) {
   197			mutex_unlock(&of_mutex);
   198			pr_err("failed to register existing nodes\n");
   199			return;
   200		}
   201		for_each_of_allnodes(np)
   202			__of_attach_node_sysfs(np);
   203		mutex_unlock(&of_mutex);
   204	
   205		/* Symlink in /proc as required by userspace ABI */
   206		if (of_root)
   207			proc_symlink("device-tree", NULL, "/sys/firmware/devicetree/base");
   208	}
   209	

---
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