All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viktor Mitin <viktor.mitin.19@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: julien.grall@arm.com, sstabellini@kernel.org,
	Viktor Mitin <viktor_mitin@epam.com>,
	Viktor Mitin <viktor.mitin.19@gmail.com>
Subject: [Xen-devel] [PATCH] xen/arm: remove unused dt_device_node parameter
Date: Tue, 18 Jun 2019 11:58:51 +0300	[thread overview]
Message-ID: <20190618085851.22902-1-viktor.mitin.19@gmail.com> (raw)

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

             reply	other threads:[~2019-06-18  8:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-18  8:58 Viktor Mitin [this message]
2019-07-07 17:29 ` [Xen-devel] [PATCH] xen/arm: remove unused dt_device_node parameter Julien Grall
2019-07-18 13:18   ` Viktor Mitin
2019-07-23 12:10     ` Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190618085851.22902-1-viktor.mitin.19@gmail.com \
    --to=viktor.mitin.19@gmail.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=viktor_mitin@epam.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.