All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Kubascik <jeff.kubascik@dornerworks.com>
To: xen-devel@lists.xenproject.org
Cc: xen-devel@dornerworks.com,
	Josh Whitehead <josh.whitehead@dornerworks.com>,
	Stewart Hildebrand <stewart.hildebrand@dornerworks.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Dario Faggioli <dfaggioli@suse.com>,
	Jeff Kubascik <jeff.kubascik@dornerworks.com>
Subject: [PATCH 3/5] sched/arinc653: Clean up function definitions
Date: Wed, 16 Sep 2020 14:18:52 -0400	[thread overview]
Message-ID: <20200916181854.75563-4-jeff.kubascik@dornerworks.com> (raw)
In-Reply-To: <20200916181854.75563-1-jeff.kubascik@dornerworks.com>

Function definitions in the arinc653 module did not follow the Xen
coding style. Furthermore, a few function names used a different prefix.
This change cleans up the definitions to be consistent with the Xen
coding style, and has no functional changes.

Signed-off-by: Jeff Kubascik <jeff.kubascik@dornerworks.com>
---
 xen/common/sched/arinc653.c | 68 +++++++++++++++----------------------
 1 file changed, 28 insertions(+), 40 deletions(-)

diff --git a/xen/common/sched/arinc653.c b/xen/common/sched/arinc653.c
index d8a23730c3..5f3a1be990 100644
--- a/xen/common/sched/arinc653.c
+++ b/xen/common/sched/arinc653.c
@@ -119,10 +119,9 @@ static int dom_handle_cmp(const xen_domain_handle_t h1,
     return memcmp(h1, h2, sizeof(xen_domain_handle_t));
 }
 
-static struct sched_unit *find_unit(
-    const struct scheduler *ops,
-    xen_domain_handle_t handle,
-    int unit_id)
+static struct sched_unit *find_unit(const struct scheduler *ops,
+                                    xen_domain_handle_t handle,
+                                    int unit_id)
 {
     struct a653sched_unit *aunit;
 
@@ -145,10 +144,8 @@ static void update_schedule_units(const struct scheduler *ops)
                       SCHED_PRIV(ops)->schedule[i].unit_id);
 }
 
-static int
-arinc653_sched_set(
-    const struct scheduler *ops,
-    struct xen_sysctl_arinc653_schedule *schedule)
+static int a653sched_set(const struct scheduler *ops,
+                         struct xen_sysctl_arinc653_schedule *schedule)
 {
     struct a653sched_private *sched_priv = SCHED_PRIV(ops);
     s_time_t total_runtime = 0;
@@ -212,10 +209,8 @@ arinc653_sched_set(
     return rc;
 }
 
-static int
-arinc653_sched_get(
-    const struct scheduler *ops,
-    struct xen_sysctl_arinc653_schedule *schedule)
+static int a653sched_get(const struct scheduler *ops,
+                         struct xen_sysctl_arinc653_schedule *schedule)
 {
     struct a653sched_private *sched_priv = SCHED_PRIV(ops);
     unsigned int i;
@@ -239,8 +234,7 @@ arinc653_sched_get(
     return 0;
 }
 
-static int
-a653sched_init(struct scheduler *ops)
+static int a653sched_init(struct scheduler *ops)
 {
     struct a653sched_private *prv;
 
@@ -257,16 +251,15 @@ a653sched_init(struct scheduler *ops)
     return 0;
 }
 
-static void
-a653sched_deinit(struct scheduler *ops)
+static void a653sched_deinit(struct scheduler *ops)
 {
     xfree(SCHED_PRIV(ops));
     ops->sched_data = NULL;
 }
 
-static void *
-a653sched_alloc_udata(const struct scheduler *ops, struct sched_unit *unit,
-                      void *dd)
+static void *a653sched_alloc_udata(const struct scheduler *ops,
+                                   struct sched_unit *unit,
+                                   void *dd)
 {
     struct a653sched_private *sched_priv = SCHED_PRIV(ops);
     struct a653sched_unit *svc;
@@ -320,8 +313,7 @@ a653sched_alloc_udata(const struct scheduler *ops, struct sched_unit *unit,
     return svc;
 }
 
-static void
-a653sched_free_udata(const struct scheduler *ops, void *priv)
+static void a653sched_free_udata(const struct scheduler *ops, void *priv)
 {
     struct a653sched_private *sched_priv = SCHED_PRIV(ops);
     struct a653sched_unit *av = priv;
@@ -341,8 +333,8 @@ a653sched_free_udata(const struct scheduler *ops, void *priv)
     spin_unlock_irqrestore(&sched_priv->lock, flags);
 }
 
-static void
-a653sched_unit_sleep(const struct scheduler *ops, struct sched_unit *unit)
+static void a653sched_unit_sleep(const struct scheduler *ops,
+                                 struct sched_unit *unit)
 {
     if ( AUNIT(unit) != NULL )
         AUNIT(unit)->awake = false;
@@ -355,8 +347,8 @@ a653sched_unit_sleep(const struct scheduler *ops, struct sched_unit *unit)
         cpu_raise_softirq(sched_unit_master(unit), SCHEDULE_SOFTIRQ);
 }
 
-static void
-a653sched_unit_wake(const struct scheduler *ops, struct sched_unit *unit)
+static void a653sched_unit_wake(const struct scheduler *ops,
+                                struct sched_unit *unit)
 {
     if ( AUNIT(unit) != NULL )
         AUNIT(unit)->awake = true;
@@ -364,12 +356,9 @@ a653sched_unit_wake(const struct scheduler *ops, struct sched_unit *unit)
     cpu_raise_softirq(sched_unit_master(unit), SCHEDULE_SOFTIRQ);
 }
 
-static void
-a653sched_do_schedule(
-    const struct scheduler *ops,
-    struct sched_unit *prev,
-    s_time_t now,
-    bool tasklet_work_scheduled)
+static void a653sched_do_schedule(const struct scheduler *ops,
+                                  struct sched_unit *prev, s_time_t now,
+                                  bool tasklet_work_scheduled)
 {
     struct sched_unit *new_task = NULL;
     static unsigned int sched_index = 0;
@@ -477,9 +466,9 @@ a653sched_pick_resource(const struct scheduler *ops,
     return get_sched_res(cpu);
 }
 
-static spinlock_t *
-a653_switch_sched(struct scheduler *new_ops, unsigned int cpu,
-                  void *pdata, void *vdata)
+static spinlock_t *a653sched_switch_sched(struct scheduler *new_ops,
+                                          unsigned int cpu, void *pdata,
+                                          void *vdata)
 {
     struct sched_resource *sr = get_sched_res(cpu);
     const struct a653sched_unit *svc = vdata;
@@ -491,9 +480,8 @@ a653_switch_sched(struct scheduler *new_ops, unsigned int cpu,
     return &sr->_lock;
 }
 
-static int
-a653sched_adjust_global(const struct scheduler *ops,
-                        struct xen_sysctl_scheduler_op *sc)
+static int a653sched_adjust_global(const struct scheduler *ops,
+                                   struct xen_sysctl_scheduler_op *sc)
 {
     struct xen_sysctl_arinc653_schedule local_sched;
     int rc = -EINVAL;
@@ -507,11 +495,11 @@ a653sched_adjust_global(const struct scheduler *ops,
             break;
         }
 
-        rc = arinc653_sched_set(ops, &local_sched);
+        rc = a653sched_set(ops, &local_sched);
         break;
     case XEN_SYSCTL_SCHEDOP_getinfo:
         memset(&local_sched, -1, sizeof(local_sched));
-        rc = arinc653_sched_get(ops, &local_sched);
+        rc = a653sched_get(ops, &local_sched);
         if ( rc )
             break;
 
@@ -547,7 +535,7 @@ static const struct scheduler sched_arinc653_def = {
 
     .pick_resource  = a653sched_pick_resource,
 
-    .switch_sched   = a653_switch_sched,
+    .switch_sched   = a653sched_switch_sched,
 
     .adjust         = NULL,
     .adjust_global  = a653sched_adjust_global,
-- 
2.17.1



  parent reply	other threads:[~2020-09-17  4:20 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 18:18 [PATCH 0/5] Multicore support for ARINC653 scheduler Jeff Kubascik
2020-09-16 18:18 ` [PATCH 1/5] sched/arinc653: Clean up comments Jeff Kubascik
2020-09-17 13:24   ` Andrew Cooper
2020-09-18 15:33     ` Jeff Kubascik
2020-09-16 18:18 ` [PATCH 2/5] sched/arinc653: Rename scheduler private structs Jeff Kubascik
2020-09-17 12:09   ` Andrew Cooper
2020-09-17 14:46     ` Dario Faggioli
2020-09-18 15:52       ` Jeff Kubascik
2020-09-16 18:18 ` Jeff Kubascik [this message]
2020-09-17  8:09   ` [PATCH 3/5] sched/arinc653: Clean up function definitions Jan Beulich
2020-09-17 14:40     ` Dario Faggioli
2020-09-18 17:43       ` Jeff Kubascik
2020-09-16 18:18 ` [PATCH 4/5] sched/arinc653: Reorganize function definition order Jeff Kubascik
2020-09-17  8:12   ` Jan Beulich
2020-09-17 14:16     ` Dario Faggioli
2020-09-18 18:21       ` Jeff Kubascik
2020-09-17 14:17     ` Andrew Cooper
2020-09-18 18:04       ` Jeff Kubascik
2020-09-18 18:05       ` Jeff Kubascik
2020-09-16 18:18 ` [PATCH 5/5] sched/arinc653: Implement CAST-32A multicore scheduling Jeff Kubascik
2020-09-17  9:04   ` Jürgen Groß
2020-09-17 15:10     ` Stewart Hildebrand
2020-09-17 15:18       ` Jürgen Groß
2020-09-17 15:20       ` Dario Faggioli
2020-09-17 15:59         ` Stewart Hildebrand
2020-09-17 17:30           ` Dario Faggioli
2020-09-18 20:03             ` Jeff Kubascik
2020-09-18 20:34               ` Dario Faggioli
2020-09-22 19:50               ` Andrew Cooper
2020-09-17 14:42   ` Andrew Cooper
2020-09-17 14:57     ` Stewart Hildebrand
2020-09-17 16:18       ` Andrew Cooper
2020-09-17 17:57         ` Stewart Hildebrand
2020-09-18 19:22           ` Jeff Kubascik

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=20200916181854.75563-4-jeff.kubascik@dornerworks.com \
    --to=jeff.kubascik@dornerworks.com \
    --cc=dfaggioli@suse.com \
    --cc=george.dunlap@citrix.com \
    --cc=josh.whitehead@dornerworks.com \
    --cc=stewart.hildebrand@dornerworks.com \
    --cc=xen-devel@dornerworks.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.