Xen-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [Xen-devel] [PATCH] xen/arm: remove unused dt_device_node parameter
@ 2019-06-18  8:58 Viktor Mitin
  2019-07-07 17:29 ` Julien Grall
  0 siblings, 1 reply; 3+ messages in thread
From: Viktor Mitin @ 2019-06-18  8:58 UTC (permalink / raw)
  To: xen-devel; +Cc: julien.grall, sstabellini, Viktor Mitin, Viktor Mitin

Some of the function generating nodes (e.g make_timer_node)
take in a dt_device_node parameter, but never used it.
It is actually misused when creating DT for DomU.
So it is the best to remove the parameter.

Suggested-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Viktor Mitin <viktor_mitin@epam.com>
---
 xen/arch/arm/domain_build.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index d9836779d1..7fb828cae2 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -742,8 +742,7 @@ static int __init make_hypervisor_node(struct domain *d,
     return res;
 }
 
-static int __init make_psci_node(void *fdt,
-                                 const struct dt_device_node *parent)
+static int __init make_psci_node(void *fdt)
 {
     int res;
     const char compat[] =
@@ -779,8 +778,7 @@ static int __init make_psci_node(void *fdt,
     return res;
 }
 
-static int __init make_cpus_node(const struct domain *d, void *fdt,
-                                 const struct dt_device_node *parent)
+static int __init make_cpus_node(const struct domain *d, void *fdt)
 {
     int res;
     const struct dt_device_node *cpus = dt_find_node_by_path("/cpus");
@@ -962,8 +960,7 @@ static int __init make_gic_node(const struct domain *d, void *fdt,
     return res;
 }
 
-static int __init make_timer_node(const struct domain *d, void *fdt,
-                                  const struct dt_device_node *node)
+static int __init make_timer_node(const struct domain *d, void *fdt)
 {
     static const struct dt_device_match timer_ids[] __initconst =
     {
@@ -1380,7 +1377,7 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo,
     if ( device_get_class(node) == DEVICE_GIC )
         return make_gic_node(d, kinfo->fdt, node);
     if ( dt_match_node(timer_matches, node) )
-        return make_timer_node(d, kinfo->fdt, node);
+        return make_timer_node(d, kinfo->fdt);
 
     /* Skip nodes used by Xen */
     if ( dt_device_used_by(node) == DOMID_XEN )
@@ -1454,11 +1451,11 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo,
         if ( res )
             return res;
 
-        res = make_psci_node(kinfo->fdt, node);
+        res = make_psci_node(kinfo->fdt);
         if ( res )
             return res;
 
-        res = make_cpus_node(d, kinfo->fdt, node);
+        res = make_cpus_node(d, kinfo->fdt);
         if ( res )
             return res;
 
@@ -1713,11 +1710,11 @@ static int __init prepare_dtb_domU(struct domain *d, struct kernel_info *kinfo)
     if ( ret )
         goto err;
 
-    ret = make_psci_node(kinfo->fdt, NULL);
+    ret = make_psci_node(kinfo->fdt);
     if ( ret )
         goto err;
 
-    ret = make_cpus_node(d, kinfo->fdt, NULL);
+    ret = make_cpus_node(d, kinfo->fdt);
     if ( ret )
         goto err;
 
-- 
2.17.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] [PATCH] xen/arm: remove unused dt_device_node parameter
  2019-06-18  8:58 [Xen-devel] [PATCH] xen/arm: remove unused dt_device_node parameter Viktor Mitin
@ 2019-07-07 17:29 ` Julien Grall
  2019-07-18 13:18   ` Viktor Mitin
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Grall @ 2019-07-07 17:29 UTC (permalink / raw)
  To: Viktor Mitin, xen-devel; +Cc: sstabellini, Viktor Mitin

Hi Viktor,

On 6/18/19 9:58 AM, Viktor Mitin wrote:
> Some of the function generating nodes (e.g make_timer_node)
> take in a dt_device_node parameter, but never used it.
> It is actually misused when creating DT for DomU.
> So it is the best to remove the parameter.
> 
> Suggested-by: Julien Grall <julien.grall@arm.com>
> Signed-off-by: Viktor Mitin <viktor_mitin@epam.com>

Reviewed-by: Julien Grall <julien.grall@arm.com>

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] [PATCH] xen/arm: remove unused dt_device_node parameter
  2019-07-07 17:29 ` Julien Grall
@ 2019-07-18 13:18   ` Viktor Mitin
  0 siblings, 0 replies; 3+ messages in thread
From: Viktor Mitin @ 2019-07-18 13:18 UTC (permalink / raw)
  To: Julien Grall; +Cc: xen-devel, Stefano Stabellini, Viktor Mitin

Hi Julien,

I've checked latest Xen staging, the patch has not been integrated yet.
Please integrate the patch if no objections.

Thanks

On Mon, Jul 8, 2019 at 3:12 PM Julien Grall <julien.grall@arm.com> wrote:
>
> Hi Viktor,
>
> On 6/18/19 9:58 AM, Viktor Mitin wrote:
> > Some of the function generating nodes (e.g make_timer_node)
> > take in a dt_device_node parameter, but never used it.
> > It is actually misused when creating DT for DomU.
> > So it is the best to remove the parameter.
> >
> > Suggested-by: Julien Grall <julien.grall@arm.com>
> > Signed-off-by: Viktor Mitin <viktor_mitin@epam.com>
>
> Reviewed-by: Julien Grall <julien.grall@arm.com>
>
> Cheers,
>
> --
> Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-18  8:58 [Xen-devel] [PATCH] xen/arm: remove unused dt_device_node parameter Viktor Mitin
2019-07-07 17:29 ` Julien Grall
2019-07-18 13:18   ` Viktor Mitin

Xen-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/xen-devel/0 xen-devel/git/0.git
	git clone --mirror https://lore.kernel.org/xen-devel/1 xen-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 xen-devel xen-devel/ https://lore.kernel.org/xen-devel \
		xen-devel@lists.xenproject.org xen-devel@archiver.kernel.org
	public-inbox-index xen-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.xenproject.lists.xen-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox