[renesas-drivers:topic/renesas-overlays 20/86] drivers//of/unittest.c:2586:3: error: implicit declaration of function '__of_attach_node_sysfs'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git topic/renesas-overlays
head:   21b4ee226c68bdaba9db7f6fc7cbdfab58db40b9
commit: 3b480353c59beefd9537feca3febda56339bbb21 [20/86] of: rename *_node_sysfs to _node_post
config: x86_64-randconfig-x013-201729 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 3b480353c59beefd9537feca3febda56339bbb21
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers//of/unittest.c: In function 'of_unittest_overlay_high_level':
>> drivers//of/unittest.c:2586:3: error: implicit declaration of function '__of_attach_node_sysfs' [-Werror=implicit-function-declaration]
      __of_attach_node_sysfs(np);
      ^~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/err.h:4:0,
                    from include/linux/clk.h:15,
                    from drivers//of/unittest.c:7:
   drivers//of/unittest.c: At top level:
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'strcpy' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:390:2: note: in expansion of macro 'if'
     if (p_size == (size_t)-1 && q_size == (size_t)-1)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:380:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:378:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:369:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:367:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:358:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:356:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:348:2: note: in expansion of macro 'if'
     if (p_size < size || q_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:345:3: note: in expansion of macro 'if'
      if (q_size < size)
      ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:343:3: note: in expansion of macro 'if'
      if (p_size < size)
      ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'

vim +/__of_attach_node_sysfs +2586 drivers//of/unittest.c

81d0848fc Frank Rowand  2017-04-25  2493  
81d0848fc Frank Rowand  2017-04-25  2494  /*
81d0848fc Frank Rowand  2017-04-25  2495   * The purpose of of_unittest_overlay_high_level is to add an overlay
81d0848fc Frank Rowand  2017-04-25  2496   * in the normal fashion.  This is a test of the whole picture,
81d0848fc Frank Rowand  2017-04-25  2497   * instead of individual elements.
81d0848fc Frank Rowand  2017-04-25  2498   *
81d0848fc Frank Rowand  2017-04-25  2499   * The first part of the function is _not_ normal overlay usage; it is
81d0848fc Frank Rowand  2017-04-25  2500   * finishing splicing the base overlay device tree into the live tree.
81d0848fc Frank Rowand  2017-04-25  2501   */
81d0848fc Frank Rowand  2017-04-25  2502  static __init void of_unittest_overlay_high_level(void)
81d0848fc Frank Rowand  2017-04-25  2503  {
81d0848fc Frank Rowand  2017-04-25  2504  	struct device_node *last_sibling;
81d0848fc Frank Rowand  2017-04-25  2505  	struct device_node *np;
81d0848fc Frank Rowand  2017-04-25  2506  	struct device_node *of_symbols;
81d0848fc Frank Rowand  2017-04-25  2507  	struct device_node *overlay_base_symbols;
81d0848fc Frank Rowand  2017-04-25  2508  	struct device_node **pprev;
81d0848fc Frank Rowand  2017-04-25  2509  	struct property *prop;
81d0848fc Frank Rowand  2017-04-25  2510  	int ret;
81d0848fc Frank Rowand  2017-04-25  2511  
81d0848fc Frank Rowand  2017-04-25  2512  	if (!overlay_base_root) {
81d0848fc Frank Rowand  2017-04-25  2513  		unittest(0, "overlay_base_root not initialized\n");
81d0848fc Frank Rowand  2017-04-25  2514  		return;
81d0848fc Frank Rowand  2017-04-25  2515  	}
81d0848fc Frank Rowand  2017-04-25  2516  
81d0848fc Frank Rowand  2017-04-25  2517  	/*
81d0848fc Frank Rowand  2017-04-25  2518  	 * Could not fixup phandles in unittest_unflatten_overlay_base()
81d0848fc Frank Rowand  2017-04-25  2519  	 * because kmalloc() was not yet available.
81d0848fc Frank Rowand  2017-04-25  2520  	 */
81d0848fc Frank Rowand  2017-04-25  2521  	of_resolve_phandles(overlay_base_root);
81d0848fc Frank Rowand  2017-04-25  2522  
81d0848fc Frank Rowand  2017-04-25  2523  	/*
81d0848fc Frank Rowand  2017-04-25  2524  	 * do not allow overlay_base to duplicate any node already in
81d0848fc Frank Rowand  2017-04-25  2525  	 * tree, this greatly simplifies the code
81d0848fc Frank Rowand  2017-04-25  2526  	 */
81d0848fc Frank Rowand  2017-04-25  2527  
81d0848fc Frank Rowand  2017-04-25  2528  	/*
81d0848fc Frank Rowand  2017-04-25  2529  	 * remove overlay_base_root node "__local_fixups", after
81d0848fc Frank Rowand  2017-04-25  2530  	 * being used by of_resolve_phandles()
81d0848fc Frank Rowand  2017-04-25  2531  	 */
81d0848fc Frank Rowand  2017-04-25  2532  	pprev = &overlay_base_root->child;
81d0848fc Frank Rowand  2017-04-25  2533  	for (np = overlay_base_root->child; np; np = np->sibling) {
81d0848fc Frank Rowand  2017-04-25  2534  		if (!of_node_cmp(np->name, "__local_fixups__")) {
81d0848fc Frank Rowand  2017-04-25  2535  			*pprev = np->sibling;
81d0848fc Frank Rowand  2017-04-25  2536  			break;
81d0848fc Frank Rowand  2017-04-25  2537  		}
81d0848fc Frank Rowand  2017-04-25  2538  		pprev = &np->sibling;
81d0848fc Frank Rowand  2017-04-25  2539  	}
81d0848fc Frank Rowand  2017-04-25  2540  
81d0848fc Frank Rowand  2017-04-25  2541  	/* remove overlay_base_root node "__symbols__" if in live tree */
81d0848fc Frank Rowand  2017-04-25  2542  	of_symbols = of_get_child_by_name(of_root, "__symbols__");
81d0848fc Frank Rowand  2017-04-25  2543  	if (of_symbols) {
81d0848fc Frank Rowand  2017-04-25  2544  		/* will have to graft properties from node into live tree */
81d0848fc Frank Rowand  2017-04-25  2545  		pprev = &overlay_base_root->child;
81d0848fc Frank Rowand  2017-04-25  2546  		for (np = overlay_base_root->child; np; np = np->sibling) {
81d0848fc Frank Rowand  2017-04-25  2547  			if (!of_node_cmp(np->name, "__symbols__")) {
81d0848fc Frank Rowand  2017-04-25  2548  				overlay_base_symbols = np;
81d0848fc Frank Rowand  2017-04-25  2549  				*pprev = np->sibling;
81d0848fc Frank Rowand  2017-04-25  2550  				break;
81d0848fc Frank Rowand  2017-04-25  2551  			}
81d0848fc Frank Rowand  2017-04-25  2552  			pprev = &np->sibling;
81d0848fc Frank Rowand  2017-04-25  2553  		}
81d0848fc Frank Rowand  2017-04-25  2554  	}
81d0848fc Frank Rowand  2017-04-25  2555  
81d0848fc Frank Rowand  2017-04-25  2556  	for (np = overlay_base_root->child; np; np = np->sibling) {
81d0848fc Frank Rowand  2017-04-25  2557  		if (of_get_child_by_name(of_root, np->name)) {
81d0848fc Frank Rowand  2017-04-25  2558  			unittest(0, "illegal node name in overlay_base %s",
81d0848fc Frank Rowand  2017-04-25  2559  				np->name);
81d0848fc Frank Rowand  2017-04-25  2560  			return;
81d0848fc Frank Rowand  2017-04-25  2561  		}
81d0848fc Frank Rowand  2017-04-25  2562  	}
81d0848fc Frank Rowand  2017-04-25  2563  
81d0848fc Frank Rowand  2017-04-25  2564  	/*
81d0848fc Frank Rowand  2017-04-25  2565  	 * overlay 'overlay_base' is not allowed to have root
81d0848fc Frank Rowand  2017-04-25  2566  	 * properties, so only need to splice nodes into main device tree.
81d0848fc Frank Rowand  2017-04-25  2567  	 *
81d0848fc Frank Rowand  2017-04-25  2568  	 * root node of *overlay_base_root will not be freed, it is lost
81d0848fc Frank Rowand  2017-04-25  2569  	 * memory.
81d0848fc Frank Rowand  2017-04-25  2570  	 */
81d0848fc Frank Rowand  2017-04-25  2571  
81d0848fc Frank Rowand  2017-04-25  2572  	for (np = overlay_base_root->child; np; np = np->sibling)
81d0848fc Frank Rowand  2017-04-25  2573  		np->parent = of_root;
81d0848fc Frank Rowand  2017-04-25  2574  
81d0848fc Frank Rowand  2017-04-25  2575  	mutex_lock(&of_mutex);
81d0848fc Frank Rowand  2017-04-25  2576  
ee320b33b Arnd Bergmann 2017-04-28  2577  	for (last_sibling = np = of_root->child; np; np = np->sibling)
81d0848fc Frank Rowand  2017-04-25  2578  		last_sibling = np;
81d0848fc Frank Rowand  2017-04-25  2579  
81d0848fc Frank Rowand  2017-04-25  2580  	if (last_sibling)
81d0848fc Frank Rowand  2017-04-25  2581  		last_sibling->sibling = overlay_base_root->child;
81d0848fc Frank Rowand  2017-04-25  2582  	else
81d0848fc Frank Rowand  2017-04-25  2583  		of_root->child = overlay_base_root->child;
81d0848fc Frank Rowand  2017-04-25  2584  
81d0848fc Frank Rowand  2017-04-25  2585  	for_each_of_allnodes_from(overlay_base_root, np)
81d0848fc Frank Rowand  2017-04-25 @2586  		__of_attach_node_sysfs(np);
81d0848fc Frank Rowand  2017-04-25  2587  
81d0848fc Frank Rowand  2017-04-25  2588  	if (of_symbols) {
81d0848fc Frank Rowand  2017-04-25  2589  		for_each_property_of_node(overlay_base_symbols, prop) {
81d0848fc Frank Rowand  2017-04-25  2590  			ret = __of_add_property(of_symbols, prop);
81d0848fc Frank Rowand  2017-04-25  2591  			if (ret) {
81d0848fc Frank Rowand  2017-04-25  2592  				unittest(0,
81d0848fc Frank Rowand  2017-04-25  2593  					 "duplicate property '%s' in overlay_base node __symbols__",
81d0848fc Frank Rowand  2017-04-25  2594  					 prop->name);
8756cd1de Dan Carpenter 2017-05-03  2595  				goto err_unlock;
81d0848fc Frank Rowand  2017-04-25  2596  			}
81d0848fc Frank Rowand  2017-04-25  2597  			ret = __of_add_property_sysfs(of_symbols, prop);
81d0848fc Frank Rowand  2017-04-25  2598  			if (ret) {
81d0848fc Frank Rowand  2017-04-25  2599  				unittest(0,
81d0848fc Frank Rowand  2017-04-25  2600  					 "unable to add property '%s' in overlay_base node __symbols__ to sysfs",
81d0848fc Frank Rowand  2017-04-25  2601  					 prop->name);
8756cd1de Dan Carpenter 2017-05-03  2602  				goto err_unlock;
81d0848fc Frank Rowand  2017-04-25  2603  			}
81d0848fc Frank Rowand  2017-04-25  2604  		}
81d0848fc Frank Rowand  2017-04-25  2605  	}
81d0848fc Frank Rowand  2017-04-25  2606  
81d0848fc Frank Rowand  2017-04-25  2607  	mutex_unlock(&of_mutex);
81d0848fc Frank Rowand  2017-04-25  2608  
81d0848fc Frank Rowand  2017-04-25  2609  
81d0848fc Frank Rowand  2017-04-25  2610  	/* now do the normal overlay usage test */
81d0848fc Frank Rowand  2017-04-25  2611  
81d0848fc Frank Rowand  2017-04-25  2612  	unittest(overlay_data_add(1),
81d0848fc Frank Rowand  2017-04-25  2613  		 "Adding overlay 'overlay' failed\n");
81d0848fc Frank Rowand  2017-04-25  2614  
81d0848fc Frank Rowand  2017-04-25  2615  	unittest(overlay_data_add(2),
81d0848fc Frank Rowand  2017-04-25  2616  		 "Adding overlay 'overlay_bad_phandle' failed\n");
8756cd1de Dan Carpenter 2017-05-03  2617  	return;
8756cd1de Dan Carpenter 2017-05-03  2618  
8756cd1de Dan Carpenter 2017-05-03  2619  err_unlock:
8756cd1de Dan Carpenter 2017-05-03  2620  	mutex_unlock(&of_mutex);
81d0848fc Frank Rowand  2017-04-25  2621  }
81d0848fc Frank Rowand  2017-04-25  2622  

:::::: The code at line 2586 was first introduced by commit
:::::: 81d0848fc8d2058c4cc645d971435c889869433b of: Add unit tests for applying overlays

:::::: TO: Frank Rowand <frank.rowand@xxxxxxxx>
:::::: CC: Rob Herring <robh@xxxxxxxxxx>

---
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]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux