devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] populate platform device at late init
@ 2016-08-18 18:55 Anshuman Gupta
       [not found] ` <1471546533-3996-1-git-send-email-anshexp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Anshuman Gupta @ 2016-08-18 18:55 UTC (permalink / raw)
  To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	frowand.list-Re5JQEeQqe8AvxtiuMwx3w
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	anshexp-Re5JQEeQqe8AvxtiuMwx3w

This patch enables to populate platform devices from device tree at late-init
As of now linux kernel has late-init call infrastructure which make a driver/module
init call at late-init.it is not specific to a platform device.
This patch make a platform device to be probe at late-init,
without making its driver a late-init call.

This will be useful in certain scenario when we have multiple instances of similar
platform devices and it is ok to defer specific device to late-init among the multiple
instance of similar devices.

Currently ARM based SOC has multiple instance of similar modules/controller
(i2c,uart,mmc controller), so for each module/controller device will get probe and
initialized at early boot, but for some instances of device it may not be needful
to be initialized it at early boot-up. If we can defer these device
probe/initialization at post init, it can improve boot up time with respect to other
system component.It can be useful in Linux based automotive infotainment platform,
where we need camera functionality (reverse view camera) as early as possible.

Example: if we have 4 i2c controller(i2c0~i2c3) and i2c0 controller is being used
by a camera driver,if camera driver is required at early boot then i2c controller driver
can not be initialized at late-init and i2c0 controller need to probe before camera driver,
but this force other i2c controller devices also to be probe at early boot-up itself,
which may not be really required.
This patch tested on freescale imx6 udoo quad board with kernel version 3.14.56.

Patch is made against 4.7 kernel.

In order to probe a platform device at late-init, we need to declare a late_init
property at desired device tree node, and invoke of_platform_populate_late_nodes exported
function call from desired board file init_late machine descriptor function.

Following files has been changed for this patch
	drivers/of/Kconfig
	drivers/of/base.c
	drivers/of/platform.c
	include/linux/of.h
	include/linux/of_platform.h

Signed-off-by: Anshuman Gupta <anshexp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/of/Kconfig          |   7 +++
 drivers/of/base.c           |  21 +++++++++
 drivers/of/platform.c       | 109 ++++++++++++++++++++++++++++++++++++++++++++
 include/linux/of.h          |   3 ++
 include/linux/of_platform.h |  14 ++++++
 5 files changed, 154 insertions(+)

diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
index bc07ad3..c8443f5 100644
--- a/drivers/of/Kconfig
+++ b/drivers/of/Kconfig
@@ -63,6 +63,13 @@ config OF_ADDRESS
 config OF_ADDRESS_PCI
 	bool
 
+config OF_LATE_NODES
+	def_bool n
+	depends on OF_ADDRESS
+	help
+	 This option makes probe of certain device nodes at late init,
+	 whichever device nodes have a late_init property true.
+
 config OF_IRQ
 	def_bool y
 	depends on !SPARC && IRQ_DOMAIN
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 7792266..c40e9a7 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -304,6 +304,7 @@ const void *__of_get_property(const struct device_node *np,
 	return pp ? pp->value : NULL;
 }
 
+
 /*
  * Find a property with a given name for a given node
  * and return the value.
@@ -317,6 +318,26 @@ const void *of_get_property(const struct device_node *np, const char *name,
 }
 EXPORT_SYMBOL(of_get_property);
 
+int of_set_property(const struct device_node *np, const char *name,
+			const void *val, int len)
+{
+	struct property *pp;
+	int lenp;
+
+	if (!np)
+		return -ENOENT;
+
+	pp = of_find_property(np, name, &lenp);
+	if (pp) {
+		memcpy(pp->value, val, len);
+		pp->length = len;
+		}
+	else
+		return -ENOENT;
+	return 0;
+
+}
+EXPORT_SYMBOL(of_set_property);
 /*
  * arch_match_cpu_phys_id - Match the given logical CPU and physical id
  *
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 765390e..2f6bcb4 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -64,6 +64,11 @@ EXPORT_SYMBOL(of_find_device_by_node);
  * mechanism for creating devices from device tree nodes.
  */
 
+#ifdef CONFIG_OF_LATE_NODES
+static LIST_HEAD(late_device_node_list);
+static int of_add_late_device_node(struct device_node *bus,
+					struct device *parent);
+#endif
 /**
  * of_device_make_bus_id - Use the device node data to assign a unique name
  * @dev: pointer to device structure that is linked to a device tree node
@@ -368,6 +373,12 @@ static int of_platform_bus_create(struct device_node *bus,
 		return 0;
 	}
 
+#ifdef CONFIG_OF_LATE_NODES
+	if (of_device_is_late_node(bus)) {
+		of_add_late_device_node(bus, parent);
+		return 0;
+	}
+#endif
 	auxdata = of_dev_lookup(lookup, bus);
 	if (auxdata) {
 		bus_id = auxdata->name;
@@ -614,4 +625,102 @@ void of_platform_register_reconfig_notifier(void)
 }
 #endif /* CONFIG_OF_DYNAMIC */
 
+#ifdef CONFIG_OF_LATE_NODES
+/**
+ * of_device_is_late_node() - check a device node whether it is late init node.
+ * @device: pointer to device tree node.
+ *
+ * Checks if late_init property of device node holds true and rturn true
+ *
+ * Returns 0 on success, < 0 on failure.
+ */
+int of_device_is_late_node(const struct device_node *device)
+{
+	const char *status;
+	int statlen;
+
+	status = of_get_property(device, "late_init", &statlen);
+	if (status == NULL)
+		return 0;
+
+	if (statlen > 0) {
+		if (!strcmp(status, "true"))
+			return 1;
+	}
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(of_device_is_late_node);
+
+/**
+ * of_add_late_device_node() - add late init device node to late_device_node_list
+ * @bus: pointer to device tree node.
+ * @parent: parent for new device
+ *
+ * This function add a late init node to a list of late init nodes
+ *
+ * Returns 0 on success, < 0 on failure.
+ */
+static int of_add_late_device_node(struct device_node *bus, struct device *parent)
+{
+	struct of_late_device_node *late_dev_node;
+	char *data = "false";
+	int len;
+
+	late_dev_node = kmalloc(sizeof(struct of_late_device_node), GFP_KERNEL);
+
+	if (!late_dev_node)
+		return -ENOMEM;
+
+	late_dev_node->late_device_node = bus;
+	late_dev_node->late_node_parent = parent;
+	INIT_LIST_HEAD(&late_dev_node->late_node);
+
+	if (list_empty(&late_dev_node->late_node)) {
+		pr_debug("added to late device node list\n");
+		list_add_tail(&late_dev_node->late_node, &late_device_node_list);
+	}
+
+	len = strlen(data) + 1;
+		of_set_property(bus, "late_init", (void *)data, len);
+	return 0;
+}
+
+/**
+ * of_platform_populate_late_nodes() - Populate late init platform devices
+ * @root: parent of the first level to probe or NULL for the root of the tree
+ * @matches: match table, NULL to use the default
+ * @lookup: auxdata table for matching id and platform_data with device nodes
+ *
+ * This function walks late init node link list,
+ * and creates platform devices from nodes.
+ *
+ * Returns 0 on success, < 0 on failure.
+ */
+int of_platform_populate_late_nodes(struct device_node *root,
+			const struct of_device_id *matches,
+			const struct of_dev_auxdata *lookup)
+{
+	struct device_node *child;
+	struct of_late_device_node *temp;
+	static struct device *parent;
+	int rc = 0;
+
+	while (!list_empty(&late_device_node_list)) {
+		temp = list_first_entry(&late_device_node_list,
+					struct of_late_device_node, late_node);
+		child = temp->late_device_node;
+		parent = temp->late_node_parent;
+
+		rc = of_platform_bus_create(child, matches, lookup, parent, true);
+		list_del_init(&temp->late_node);
+		kfree(temp);
+		if (rc)
+			break;
+	}
+
+	return rc;
+}
+EXPORT_SYMBOL_GPL(of_platform_populate_late_nodes);
+#endif /* CONFIG_OF_LATE_NODES */
 #endif /* CONFIG_OF_ADDRESS */
diff --git a/include/linux/of.h b/include/linux/of.h
index 3d9ff8e..74f4664 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -324,6 +324,9 @@ extern bool of_device_is_big_endian(const struct device_node *device);
 extern const void *of_get_property(const struct device_node *node,
 				const char *name,
 				int *lenp);
+extern int of_set_property(const struct device_node *node,
+				const char *name, const void *val,
+				int len);
 extern struct device_node *of_get_cpu_node(int cpu, unsigned int *thread);
 #define for_each_property_of_node(dn, pp) \
 	for (pp = dn->properties; pp != NULL; pp = pp->next)
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 956a100..d348f2d 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -51,6 +51,13 @@ struct of_dev_auxdata {
 	{ .compatible = _compat, .phys_addr = _phys, .name = _name, \
 	  .platform_data = _pdata }
 
+#ifdef CONFIG_OF_LATE_NODES
+struct of_late_device_node {
+	struct device_node *late_device_node;
+	struct device *late_node_parent;
+	struct list_head late_node;
+};
+#endif
 extern const struct of_device_id of_default_bus_match_table[];
 
 /* Platform drivers register/unregister */
@@ -76,6 +83,13 @@ extern int of_platform_default_populate(struct device_node *root,
 					const struct of_dev_auxdata *lookup,
 					struct device *parent);
 extern void of_platform_depopulate(struct device *parent);
+#ifdef CONFIG_OF_LATE_NODES
+extern int of_platform_populate_late_nodes(struct device_node *root,
+				const struct of_device_id *matches,
+				const struct of_dev_auxdata *lookup);
+
+extern int of_device_is_late_node(const struct device_node *device);
+#endif
 #else
 static inline int of_platform_populate(struct device_node *root,
 					const struct of_device_id *matches,
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] populate platform device at late init
       [not found] ` <1471546533-3996-1-git-send-email-anshexp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-08-19  0:58   ` Rob Herring
  2016-08-22  8:55   ` kbuild test robot
  2016-08-22 11:57   ` kbuild test robot
  2 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2016-08-19  0:58 UTC (permalink / raw)
  To: Anshuman Gupta
  Cc: Frank Rowand, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Thu, Aug 18, 2016 at 1:55 PM, Anshuman Gupta <anshexp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> This patch enables to populate platform devices from device tree at late-init
> As of now linux kernel has late-init call infrastructure which make a driver/module
> init call at late-init.it is not specific to a platform device.
> This patch make a platform device to be probe at late-init,
> without making its driver a late-init call.
>
> This will be useful in certain scenario when we have multiple instances of similar
> platform devices and it is ok to defer specific device to late-init among the multiple
> instance of similar devices.
>
> Currently ARM based SOC has multiple instance of similar modules/controller
> (i2c,uart,mmc controller), so for each module/controller device will get probe and
> initialized at early boot, but for some instances of device it may not be needful
> to be initialized it at early boot-up. If we can defer these device
> probe/initialization at post init, it can improve boot up time with respect to other
> system component.It can be useful in Linux based automotive infotainment platform,
> where we need camera functionality (reverse view camera) as early as possible.
>
> Example: if we have 4 i2c controller(i2c0~i2c3) and i2c0 controller is being used
> by a camera driver,if camera driver is required at early boot then i2c controller driver
> can not be initialized at late-init and i2c0 controller need to probe before camera driver,
> but this force other i2c controller devices also to be probe at early boot-up itself,
> which may not be really required.
> This patch tested on freescale imx6 udoo quad board with kernel version 3.14.56.

You should generally test with something not ancient, but...

> Patch is made against 4.7 kernel.
>
> In order to probe a platform device at late-init, we need to declare a late_init
> property at desired device tree node, and invoke of_platform_populate_late_nodes exported
> function call from desired board file init_late machine descriptor function.

Sorry, but this approach is never going to be accepted. Similar things
have come up for boot time optimizations. This needs to be part of
more general tracking of functional dependencies (e.g. camera depends
on i2c). Once we have that, then we can prioritize what to init first
(e.g. camera).

> Following files has been changed for this patch
>         drivers/of/Kconfig
>         drivers/of/base.c
>         drivers/of/platform.c
>         include/linux/of.h
>         include/linux/of_platform.h

Not useful information in the commit msg because it is generated right here:

>  drivers/of/Kconfig          |   7 +++
>  drivers/of/base.c           |  21 +++++++++
>  drivers/of/platform.c       | 109 ++++++++++++++++++++++++++++++++++++++++++++
>  include/linux/of.h          |   3 ++
>  include/linux/of_platform.h |  14 ++++++
>  5 files changed, 154 insertions(+)
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] populate platform device at late init
       [not found] ` <1471546533-3996-1-git-send-email-anshexp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2016-08-19  0:58   ` Rob Herring
@ 2016-08-22  8:55   ` kbuild test robot
  2016-08-22 11:57   ` kbuild test robot
  2 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2016-08-22  8:55 UTC (permalink / raw)
  Cc: kbuild-all-JC7UmRfGjtg, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	frowand.list-Re5JQEeQqe8AvxtiuMwx3w,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	anshexp-Re5JQEeQqe8AvxtiuMwx3w

[-- Attachment #1: Type: text/plain, Size: 5388 bytes --]

Hi Anshuman,

[auto build test ERROR on v4.8-rc2]
[also build test ERROR on next-20160819]
[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]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/Anshuman-Gupta/populate-platform-device-at-late-init/20160819-124221
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sparc64 

All error/warnings (new ones prefixed by >>):

   In file included from arch/sparc/include/asm/openprom.h:14:0,
                    from arch/sparc/include/asm/device.h:9,
                    from include/linux/device.h:30,
                    from include/linux/node.h:17,
                    from include/linux/cpu.h:16,
                    from drivers/of/base.c:25:
>> include/linux/of.h:327:12: error: conflicting types for 'of_set_property'
    extern int of_set_property(const struct device_node *node,
               ^
   In file included from include/linux/of.h:232:0,
                    from arch/sparc/include/asm/openprom.h:14,
                    from arch/sparc/include/asm/device.h:9,
                    from include/linux/device.h:30,
                    from include/linux/node.h:17,
                    from include/linux/cpu.h:16,
                    from drivers/of/base.c:25:
   arch/sparc/include/asm/prom.h:40:5: note: previous declaration of 'of_set_property' was here
    int of_set_property(struct device_node *node, const char *name, void *val, int len);
        ^
>> drivers/of/base.c:321:5: error: conflicting types for 'of_set_property'
    int of_set_property(const struct device_node *np, const char *name,
        ^
   In file included from include/linux/of.h:232:0,
                    from arch/sparc/include/asm/openprom.h:14,
                    from arch/sparc/include/asm/device.h:9,
                    from include/linux/device.h:30,
                    from include/linux/node.h:17,
                    from include/linux/cpu.h:16,
                    from drivers/of/base.c:25:
   arch/sparc/include/asm/prom.h:40:5: note: previous declaration of 'of_set_property' was here
    int of_set_property(struct device_node *node, const char *name, void *val, int len);
        ^
   In file included from include/linux/linkage.h:6:0,
                    from include/linux/kernel.h:6,
                    from include/linux/list.h:8,
                    from include/linux/kobject.h:20,
                    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:340:15: error: conflicting types for 'of_set_property'
    EXPORT_SYMBOL(of_set_property);
                  ^
   include/linux/export.h:57:21: note: in definition of macro '___EXPORT_SYMBOL'
     extern typeof(sym) sym;     \
                        ^
>> drivers/of/base.c:340:1: note: in expansion of macro 'EXPORT_SYMBOL'
    EXPORT_SYMBOL(of_set_property);
    ^
   In file included from include/linux/of.h:232:0,
                    from arch/sparc/include/asm/openprom.h:14,
                    from arch/sparc/include/asm/device.h:9,
                    from include/linux/device.h:30,
                    from include/linux/node.h:17,
                    from include/linux/cpu.h:16,
                    from drivers/of/base.c:25:
   arch/sparc/include/asm/prom.h:40:5: note: previous declaration of 'of_set_property' was here
    int of_set_property(struct device_node *node, const char *name, void *val, int len);
        ^
--
   In file included from drivers/of/device.c:3:0:
>> include/linux/of.h:327:12: error: conflicting types for 'of_set_property'
    extern int of_set_property(const struct device_node *node,
               ^
   In file included from include/linux/of.h:232:0,
                    from drivers/of/device.c:3:
   arch/sparc/include/asm/prom.h:40:5: note: previous declaration of 'of_set_property' was here
    int of_set_property(struct device_node *node, const char *name, void *val, int len);
        ^

vim +/of_set_property +327 include/linux/of.h

   321					      const char *const *compat);
   322	extern bool of_device_is_available(const struct device_node *device);
   323	extern bool of_device_is_big_endian(const struct device_node *device);
   324	extern const void *of_get_property(const struct device_node *node,
   325					const char *name,
   326					int *lenp);
 > 327	extern int of_set_property(const struct device_node *node,
   328					const char *name, const void *val,
   329					int len);
   330	extern struct device_node *of_get_cpu_node(int cpu, unsigned int *thread);

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 47053 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] populate platform device at late init
       [not found] ` <1471546533-3996-1-git-send-email-anshexp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2016-08-19  0:58   ` Rob Herring
  2016-08-22  8:55   ` kbuild test robot
@ 2016-08-22 11:57   ` kbuild test robot
  2 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2016-08-22 11:57 UTC (permalink / raw)
  Cc: kbuild-all-JC7UmRfGjtg, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	frowand.list-Re5JQEeQqe8AvxtiuMwx3w,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	anshexp-Re5JQEeQqe8AvxtiuMwx3w

[-- Attachment #1: Type: text/plain, Size: 7075 bytes --]

Hi Anshuman,

[auto build test ERROR on v4.8-rc2]
[also build test ERROR on next-20160822]
[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]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/Anshuman-Gupta/populate-platform-device-at-late-init/20160819-124221
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sparc64 

All errors (new ones prefixed by >>):

   In file included from arch/sparc/include/asm/openprom.h:14:0,
                    from arch/sparc/include/asm/oplib_64.h:11,
                    from arch/sparc/include/asm/oplib.h:4,
                    from arch/sparc/kernel/traps_64.c:28:
>> include/linux/of.h:327:12: error: conflicting types for 'of_set_property'
    extern int of_set_property(const struct device_node *node,
               ^
   In file included from include/linux/of.h:232:0,
                    from arch/sparc/include/asm/openprom.h:14,
                    from arch/sparc/include/asm/oplib_64.h:11,
                    from arch/sparc/include/asm/oplib.h:4,
                    from arch/sparc/kernel/traps_64.c:28:
   arch/sparc/include/asm/prom.h:40:5: note: previous declaration of 'of_set_property' was here
    int of_set_property(struct device_node *node, const char *name, void *val, int len);
        ^
--
   In file included from arch/sparc/kernel/prom_common.c:22:0:
>> include/linux/of.h:327:12: error: conflicting types for 'of_set_property'
    extern int of_set_property(const struct device_node *node,
               ^
   In file included from include/linux/of.h:232:0,
                    from arch/sparc/kernel/prom_common.c:22:
   arch/sparc/include/asm/prom.h:40:5: note: previous declaration of 'of_set_property' was here
    int of_set_property(struct device_node *node, const char *name, void *val, int len);
        ^
   In file included from include/linux/linkage.h:6:0,
                    from include/linux/kernel.h:6,
                    from arch/sparc/kernel/prom_common.c:17:
>> arch/sparc/kernel/prom_common.c:102:15: error: conflicting types for 'of_set_property'
    EXPORT_SYMBOL(of_set_property);
                  ^
   include/linux/export.h:57:21: note: in definition of macro '___EXPORT_SYMBOL'
     extern typeof(sym) sym;     \
                        ^
   arch/sparc/kernel/prom_common.c:102:1: note: in expansion of macro 'EXPORT_SYMBOL'
    EXPORT_SYMBOL(of_set_property);
    ^
   arch/sparc/kernel/prom_common.c:54:5: note: previous definition of 'of_set_property' was here
    int of_set_property(struct device_node *dp, const char *name, void *val, int len)
        ^
--
   In file included from arch/sparc/include/asm/openprom.h:14:0,
                    from arch/sparc/include/asm/device.h:9,
                    from include/linux/device.h:30,
                    from include/linux/node.h:17,
                    from include/linux/cpu.h:16,
                    from drivers/of/base.c:25:
>> include/linux/of.h:327:12: error: conflicting types for 'of_set_property'
    extern int of_set_property(const struct device_node *node,
               ^
   In file included from include/linux/of.h:232:0,
                    from arch/sparc/include/asm/openprom.h:14,
                    from arch/sparc/include/asm/device.h:9,
                    from include/linux/device.h:30,
                    from include/linux/node.h:17,
                    from include/linux/cpu.h:16,
                    from drivers/of/base.c:25:
   arch/sparc/include/asm/prom.h:40:5: note: previous declaration of 'of_set_property' was here
    int of_set_property(struct device_node *node, const char *name, void *val, int len);
        ^
>> drivers/of/base.c:321:5: error: conflicting types for 'of_set_property'
    int of_set_property(const struct device_node *np, const char *name,
        ^
   In file included from include/linux/of.h:232:0,
                    from arch/sparc/include/asm/openprom.h:14,
                    from arch/sparc/include/asm/device.h:9,
                    from include/linux/device.h:30,
                    from include/linux/node.h:17,
                    from include/linux/cpu.h:16,
                    from drivers/of/base.c:25:
   arch/sparc/include/asm/prom.h:40:5: note: previous declaration of 'of_set_property' was here
    int of_set_property(struct device_node *node, const char *name, void *val, int len);
        ^
   In file included from include/linux/linkage.h:6:0,
                    from include/linux/kernel.h:6,
                    from include/linux/list.h:8,
                    from include/linux/kobject.h:20,
                    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:340:15: error: conflicting types for 'of_set_property'
    EXPORT_SYMBOL(of_set_property);
                  ^
   include/linux/export.h:57:21: note: in definition of macro '___EXPORT_SYMBOL'
     extern typeof(sym) sym;     \
                        ^
   drivers/of/base.c:340:1: note: in expansion of macro 'EXPORT_SYMBOL'
    EXPORT_SYMBOL(of_set_property);
    ^
   In file included from include/linux/of.h:232:0,
                    from arch/sparc/include/asm/openprom.h:14,
                    from arch/sparc/include/asm/device.h:9,
                    from include/linux/device.h:30,
                    from include/linux/node.h:17,
                    from include/linux/cpu.h:16,
                    from drivers/of/base.c:25:
   arch/sparc/include/asm/prom.h:40:5: note: previous declaration of 'of_set_property' was here
    int of_set_property(struct device_node *node, const char *name, void *val, int len);
        ^

vim +/of_set_property +327 include/linux/of.h

   321					      const char *const *compat);
   322	extern bool of_device_is_available(const struct device_node *device);
   323	extern bool of_device_is_big_endian(const struct device_node *device);
   324	extern const void *of_get_property(const struct device_node *node,
   325					const char *name,
   326					int *lenp);
 > 327	extern int of_set_property(const struct device_node *node,
   328					const char *name, const void *val,
   329					int len);
   330	extern struct device_node *of_get_cpu_node(int cpu, unsigned int *thread);

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 46948 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-22 11:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-18 18:55 [PATCH] populate platform device at late init Anshuman Gupta
     [not found] ` <1471546533-3996-1-git-send-email-anshexp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-19  0:58   ` Rob Herring
2016-08-22  8:55   ` kbuild test robot
2016-08-22 11:57   ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).