Re: [PATCH v3 1/4] of: remove *phandle properties from expanded device tree

2017-04-30 Thread Frank Rowand
On 04/29/17 17:22, kbuild test robot wrote:
> Hi Frank,
> 
> [auto build test ERROR on robh/for-next]
> [also build test ERROR on v4.11-rc8 next-20170428]
> [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-remove-phandle-properties-from-expanded-device-tree/20170426-000149
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git 
> for-next
> config: s390-allmodconfig (attached as .config)
> compiler: s390x-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
> wget 
> https://raw.githubusercontent.com/01org/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=s390 
> 
> All errors (new ones prefixed by >>):
> 
>In file included from include/linux/kobject.h:21:0,
> from include/linux/device.h:17,
> from include/linux/node.h:17,
> from include/linux/cpu.h:16,
> from drivers/of/base.c:25:
>drivers/of/base.c: In function '__of_add_phandle_sysfs':
>>> drivers/of/base.c:198:23: error: 'pp' undeclared (first use in this 
>>> function)
>  sysfs_bin_attr_init(>attr);
>   ^

Thanks for the report!

A patch to fix this is now submitted to Rob.

-Frank

>include/linux/sysfs.h:54:3: note: in definition of macro 'sysfs_attr_init'
>  (attr)->key = &__key;\
>   ^~~~
>drivers/of/base.c:198:2: note: in expansion of macro 'sysfs_bin_attr_init'
>  sysfs_bin_attr_init(>attr);
>  ^~~
>drivers/of/base.c:198:23: note: each undeclared identifier is reported 
> only once for each function it appears in
>  sysfs_bin_attr_init(>attr);
>   ^
>include/linux/sysfs.h:54:3: note: in definition of macro 'sysfs_attr_init'
>  (attr)->key = &__key;\
>   ^~~~
>drivers/of/base.c:198:2: note: in expansion of macro 'sysfs_bin_attr_init'
>  sysfs_bin_attr_init(>attr);
>  ^~~
> 
> vim +/pp +198 drivers/of/base.c
> 
> 19 */
> 20
> 21#define pr_fmt(fmt) "OF: " fmt
> 22
> 23#include 
> 24#include 
>   > 25#include 
> 26#include 
> 27#include 
> 28#include 
> 29#include 
> 30#include 
> 31#include 
> 32#include 
> 33#include 
> 34
> 35#include "of_private.h"
> 36
> 37LIST_HEAD(aliases_lookup);
> 38
> 39struct device_node *of_root;
> 40EXPORT_SYMBOL(of_root);
> 41struct device_node *of_chosen;
> 42struct device_node *of_aliases;
> 43struct device_node *of_stdout;
> 44static const char *of_stdout_options;
> 45
> 46struct kset *of_kset;
> 47
> 48/*
> 49 * Used to protect the of_aliases, to hold off addition of 
> nodes to sysfs.
> 50 * This mutex must be held whenever modifications are being 
> made to the
> 51 * device tree. The of_{attach,detach}_node() and
> 52 * of_{add,remove,update}_property() helpers make sure this 
> happens.
> 53 */
> 54DEFINE_MUTEX(of_mutex);
> 55
> 56/* use when traversing tree through the child, sibling,
> 57 * or parent members of struct device_node.
> 58 */
> 59DEFINE_RAW_SPINLOCK(devtree_lock);
> 60
> 61int of_n_addr_cells(struct device_node *np)
> 62{
> 63const __be32 *ip;
> 64
> 65do {
> 66if (np->parent)
> 67np = np->parent;
> 68ip = of_get_property(np, "#address-cells", 
> NULL);
> 69if (ip)
> 70return be32_to_cpup(ip);
> 71} while (np->parent);
> 72/* No #address-cells property for the root node */
> 73return OF_ROOT_NODE_ADDR_CELLS_DEFAULT;
> 74}
> 75EXPORT_SYMBOL(of_n_addr_cells);
> 76
> 77int of_n_size_cells(struct device_node *np)
> 78{
> 79const __be32 *ip;
> 80
> 81do {
> 82if (np->parent)
> 83np = np->parent;
> 84ip = of_get_property(np, "#size-cells", NULL);
> 85if (ip)
> 86return be32_to_cpup(ip);
> 87} while (np->parent);
> 

Re: [PATCH v3 1/4] of: remove *phandle properties from expanded device tree

2017-04-30 Thread Frank Rowand
On 04/29/17 17:22, kbuild test robot wrote:
> Hi Frank,
> 
> [auto build test ERROR on robh/for-next]
> [also build test ERROR on v4.11-rc8 next-20170428]
> [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-remove-phandle-properties-from-expanded-device-tree/20170426-000149
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git 
> for-next
> config: s390-allmodconfig (attached as .config)
> compiler: s390x-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
> wget 
> https://raw.githubusercontent.com/01org/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=s390 
> 
> All errors (new ones prefixed by >>):
> 
>In file included from include/linux/kobject.h:21:0,
> from include/linux/device.h:17,
> from include/linux/node.h:17,
> from include/linux/cpu.h:16,
> from drivers/of/base.c:25:
>drivers/of/base.c: In function '__of_add_phandle_sysfs':
>>> drivers/of/base.c:198:23: error: 'pp' undeclared (first use in this 
>>> function)
>  sysfs_bin_attr_init(>attr);
>   ^

Thanks for the report!

A patch to fix this is now submitted to Rob.

-Frank

>include/linux/sysfs.h:54:3: note: in definition of macro 'sysfs_attr_init'
>  (attr)->key = &__key;\
>   ^~~~
>drivers/of/base.c:198:2: note: in expansion of macro 'sysfs_bin_attr_init'
>  sysfs_bin_attr_init(>attr);
>  ^~~
>drivers/of/base.c:198:23: note: each undeclared identifier is reported 
> only once for each function it appears in
>  sysfs_bin_attr_init(>attr);
>   ^
>include/linux/sysfs.h:54:3: note: in definition of macro 'sysfs_attr_init'
>  (attr)->key = &__key;\
>   ^~~~
>drivers/of/base.c:198:2: note: in expansion of macro 'sysfs_bin_attr_init'
>  sysfs_bin_attr_init(>attr);
>  ^~~
> 
> vim +/pp +198 drivers/of/base.c
> 
> 19 */
> 20
> 21#define pr_fmt(fmt) "OF: " fmt
> 22
> 23#include 
> 24#include 
>   > 25#include 
> 26#include 
> 27#include 
> 28#include 
> 29#include 
> 30#include 
> 31#include 
> 32#include 
> 33#include 
> 34
> 35#include "of_private.h"
> 36
> 37LIST_HEAD(aliases_lookup);
> 38
> 39struct device_node *of_root;
> 40EXPORT_SYMBOL(of_root);
> 41struct device_node *of_chosen;
> 42struct device_node *of_aliases;
> 43struct device_node *of_stdout;
> 44static const char *of_stdout_options;
> 45
> 46struct kset *of_kset;
> 47
> 48/*
> 49 * Used to protect the of_aliases, to hold off addition of 
> nodes to sysfs.
> 50 * This mutex must be held whenever modifications are being 
> made to the
> 51 * device tree. The of_{attach,detach}_node() and
> 52 * of_{add,remove,update}_property() helpers make sure this 
> happens.
> 53 */
> 54DEFINE_MUTEX(of_mutex);
> 55
> 56/* use when traversing tree through the child, sibling,
> 57 * or parent members of struct device_node.
> 58 */
> 59DEFINE_RAW_SPINLOCK(devtree_lock);
> 60
> 61int of_n_addr_cells(struct device_node *np)
> 62{
> 63const __be32 *ip;
> 64
> 65do {
> 66if (np->parent)
> 67np = np->parent;
> 68ip = of_get_property(np, "#address-cells", 
> NULL);
> 69if (ip)
> 70return be32_to_cpup(ip);
> 71} while (np->parent);
> 72/* No #address-cells property for the root node */
> 73return OF_ROOT_NODE_ADDR_CELLS_DEFAULT;
> 74}
> 75EXPORT_SYMBOL(of_n_addr_cells);
> 76
> 77int of_n_size_cells(struct device_node *np)
> 78{
> 79const __be32 *ip;
> 80
> 81do {
> 82if (np->parent)
> 83np = np->parent;
> 84ip = of_get_property(np, "#size-cells", NULL);
> 85if (ip)
> 86return be32_to_cpup(ip);
> 87} while (np->parent);
> 

Re: [PATCH v3 1/4] of: remove *phandle properties from expanded device tree

2017-04-29 Thread kbuild test robot
Hi Frank,

[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.11-rc8 next-20170428]
[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-remove-phandle-properties-from-expanded-device-tree/20170426-000149
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: s390-allmodconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget 
https://raw.githubusercontent.com/01org/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=s390 

All errors (new ones prefixed by >>):

   In file included from include/linux/kobject.h:21:0,
from include/linux/device.h:17,
from include/linux/node.h:17,
from include/linux/cpu.h:16,
from drivers/of/base.c:25:
   drivers/of/base.c: In function '__of_add_phandle_sysfs':
>> drivers/of/base.c:198:23: error: 'pp' undeclared (first use in this function)
 sysfs_bin_attr_init(>attr);
  ^
   include/linux/sysfs.h:54:3: note: in definition of macro 'sysfs_attr_init'
 (attr)->key = &__key;\
  ^~~~
   drivers/of/base.c:198:2: note: in expansion of macro 'sysfs_bin_attr_init'
 sysfs_bin_attr_init(>attr);
 ^~~
   drivers/of/base.c:198:23: note: each undeclared identifier is reported only 
once for each function it appears in
 sysfs_bin_attr_init(>attr);
  ^
   include/linux/sysfs.h:54:3: note: in definition of macro 'sysfs_attr_init'
 (attr)->key = &__key;\
  ^~~~
   drivers/of/base.c:198:2: note: in expansion of macro 'sysfs_bin_attr_init'
 sysfs_bin_attr_init(>attr);
 ^~~

vim +/pp +198 drivers/of/base.c

19   */
20  
21  #define pr_fmt(fmt) "OF: " fmt
22  
23  #include 
24  #include 
  > 25  #include 
26  #include 
27  #include 
28  #include 
29  #include 
30  #include 
31  #include 
32  #include 
33  #include 
34  
35  #include "of_private.h"
36  
37  LIST_HEAD(aliases_lookup);
38  
39  struct device_node *of_root;
40  EXPORT_SYMBOL(of_root);
41  struct device_node *of_chosen;
42  struct device_node *of_aliases;
43  struct device_node *of_stdout;
44  static const char *of_stdout_options;
45  
46  struct kset *of_kset;
47  
48  /*
49   * Used to protect the of_aliases, to hold off addition of nodes to 
sysfs.
50   * This mutex must be held whenever modifications are being made to the
51   * device tree. The of_{attach,detach}_node() and
52   * of_{add,remove,update}_property() helpers make sure this happens.
53   */
54  DEFINE_MUTEX(of_mutex);
55  
56  /* use when traversing tree through the child, sibling,
57   * or parent members of struct device_node.
58   */
59  DEFINE_RAW_SPINLOCK(devtree_lock);
60  
61  int of_n_addr_cells(struct device_node *np)
62  {
63  const __be32 *ip;
64  
65  do {
66  if (np->parent)
67  np = np->parent;
68  ip = of_get_property(np, "#address-cells", NULL);
69  if (ip)
70  return be32_to_cpup(ip);
71  } while (np->parent);
72  /* No #address-cells property for the root node */
73  return OF_ROOT_NODE_ADDR_CELLS_DEFAULT;
74  }
75  EXPORT_SYMBOL(of_n_addr_cells);
76  
77  int of_n_size_cells(struct device_node *np)
78  {
79  const __be32 *ip;
80  
81  do {
82  if (np->parent)
83  np = np->parent;
84  ip = of_get_property(np, "#size-cells", NULL);
85  if (ip)
86  return be32_to_cpup(ip);
87  } while (np->parent);
88  /* No #size-cells property for the root node */
89  return OF_ROOT_NODE_SIZE_CELLS_DEFAULT;
90  }
91  EXPORT_SYMBOL(of_n_size_cells);
92  
93  #ifdef CONFIG_NUMA
94  int __weak of_node_to_nid(struct device_node *np)
95  {
96  return NUMA_NO_NODE;
97  }
98  #endif
99  
   100  #ifndef CONFIG_OF_DYNAMIC
   101  static void of_node_release(struct kobject *kobj)
   102  {
   103  /* Without CONFIG_OF_DYNAMIC, no nodes gets freed */
   104  }
   105  #endif /* CONFIG_OF_DYNAMIC */
   106  
   107  struct kobj_type of_node_ktype = {
   108  .release = of_node_release,
   109  };
   110  
   111  static ssize_t of_node_property_read(struct file *filp, struct kobject 
*kobj,
   112   

Re: [PATCH v3 1/4] of: remove *phandle properties from expanded device tree

2017-04-29 Thread kbuild test robot
Hi Frank,

[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.11-rc8 next-20170428]
[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-remove-phandle-properties-from-expanded-device-tree/20170426-000149
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: s390-allmodconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget 
https://raw.githubusercontent.com/01org/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=s390 

All errors (new ones prefixed by >>):

   In file included from include/linux/kobject.h:21:0,
from include/linux/device.h:17,
from include/linux/node.h:17,
from include/linux/cpu.h:16,
from drivers/of/base.c:25:
   drivers/of/base.c: In function '__of_add_phandle_sysfs':
>> drivers/of/base.c:198:23: error: 'pp' undeclared (first use in this function)
 sysfs_bin_attr_init(>attr);
  ^
   include/linux/sysfs.h:54:3: note: in definition of macro 'sysfs_attr_init'
 (attr)->key = &__key;\
  ^~~~
   drivers/of/base.c:198:2: note: in expansion of macro 'sysfs_bin_attr_init'
 sysfs_bin_attr_init(>attr);
 ^~~
   drivers/of/base.c:198:23: note: each undeclared identifier is reported only 
once for each function it appears in
 sysfs_bin_attr_init(>attr);
  ^
   include/linux/sysfs.h:54:3: note: in definition of macro 'sysfs_attr_init'
 (attr)->key = &__key;\
  ^~~~
   drivers/of/base.c:198:2: note: in expansion of macro 'sysfs_bin_attr_init'
 sysfs_bin_attr_init(>attr);
 ^~~

vim +/pp +198 drivers/of/base.c

19   */
20  
21  #define pr_fmt(fmt) "OF: " fmt
22  
23  #include 
24  #include 
  > 25  #include 
26  #include 
27  #include 
28  #include 
29  #include 
30  #include 
31  #include 
32  #include 
33  #include 
34  
35  #include "of_private.h"
36  
37  LIST_HEAD(aliases_lookup);
38  
39  struct device_node *of_root;
40  EXPORT_SYMBOL(of_root);
41  struct device_node *of_chosen;
42  struct device_node *of_aliases;
43  struct device_node *of_stdout;
44  static const char *of_stdout_options;
45  
46  struct kset *of_kset;
47  
48  /*
49   * Used to protect the of_aliases, to hold off addition of nodes to 
sysfs.
50   * This mutex must be held whenever modifications are being made to the
51   * device tree. The of_{attach,detach}_node() and
52   * of_{add,remove,update}_property() helpers make sure this happens.
53   */
54  DEFINE_MUTEX(of_mutex);
55  
56  /* use when traversing tree through the child, sibling,
57   * or parent members of struct device_node.
58   */
59  DEFINE_RAW_SPINLOCK(devtree_lock);
60  
61  int of_n_addr_cells(struct device_node *np)
62  {
63  const __be32 *ip;
64  
65  do {
66  if (np->parent)
67  np = np->parent;
68  ip = of_get_property(np, "#address-cells", NULL);
69  if (ip)
70  return be32_to_cpup(ip);
71  } while (np->parent);
72  /* No #address-cells property for the root node */
73  return OF_ROOT_NODE_ADDR_CELLS_DEFAULT;
74  }
75  EXPORT_SYMBOL(of_n_addr_cells);
76  
77  int of_n_size_cells(struct device_node *np)
78  {
79  const __be32 *ip;
80  
81  do {
82  if (np->parent)
83  np = np->parent;
84  ip = of_get_property(np, "#size-cells", NULL);
85  if (ip)
86  return be32_to_cpup(ip);
87  } while (np->parent);
88  /* No #size-cells property for the root node */
89  return OF_ROOT_NODE_SIZE_CELLS_DEFAULT;
90  }
91  EXPORT_SYMBOL(of_n_size_cells);
92  
93  #ifdef CONFIG_NUMA
94  int __weak of_node_to_nid(struct device_node *np)
95  {
96  return NUMA_NO_NODE;
97  }
98  #endif
99  
   100  #ifndef CONFIG_OF_DYNAMIC
   101  static void of_node_release(struct kobject *kobj)
   102  {
   103  /* Without CONFIG_OF_DYNAMIC, no nodes gets freed */
   104  }
   105  #endif /* CONFIG_OF_DYNAMIC */
   106  
   107  struct kobj_type of_node_ktype = {
   108  .release = of_node_release,
   109  };
   110  
   111  static ssize_t of_node_property_read(struct file *filp, struct kobject 
*kobj,
   112