]> xenbits.xensource.com Git - xen.git/commitdiff
common/sched: address a violation of MISRA C Rule 8.7
authorVictor Lira <victorm.lira@amd.com>
Mon, 22 Jul 2024 07:37:45 +0000 (09:37 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 22 Jul 2024 07:37:45 +0000 (09:37 +0200)
Rule 8.7: "Functions and objects should not be defined with external
linkage if they are referenced in only one translation unit".

This patch fixes this by adding the static specifier.
No functional changes.

Reported-by: Stewart Hildebrand stewart.hildebrand@amd.com
Signed-off-by: Victor Lira <victorm.lira@amd.com>
Acked-by: George Dunlap <george.dunlap@cloud.com>
xen/common/sched/credit2.c

index 685929c2902b58c06d98104a8c1254a8efb7cef7..b4e03e2a635c86e09b7cb42b96f04e35f3090f76 100644 (file)
@@ -1476,8 +1476,8 @@ static inline void runq_remove(struct csched2_unit *svc)
     list_del_init(&svc->runq_elem);
 }
 
-void burn_credits(struct csched2_runqueue_data *rqd, struct csched2_unit *svc,
-                  s_time_t now);
+static void burn_credits(struct csched2_runqueue_data *rqd,
+                         struct csched2_unit *svc, s_time_t now);
 
 static inline void
 tickle_cpu(unsigned int cpu, struct csched2_runqueue_data *rqd)
@@ -1855,8 +1855,8 @@ static void reset_credit(int cpu, s_time_t now, struct csched2_unit *snext)
     /* No need to resort runqueue, as everyone's order should be the same. */
 }
 
-void burn_credits(struct csched2_runqueue_data *rqd,
-                  struct csched2_unit *svc, s_time_t now)
+static void burn_credits(struct csched2_runqueue_data *rqd,
+                         struct csched2_unit *svc, s_time_t now)
 {
     s_time_t delta;