[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XEN PATCH v2] common/sched: address a violation of MISRA C Rule 8.8


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: <victorm.lira@xxxxxxx>
  • Date: Fri, 21 Jun 2024 12:59:51 -0700
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=azn84zSL6Ad+0R+BeGFFrMViBNjrO0AdAP5Q7j2OxqE=; b=iLl3GDFe6T/FTsPhAMrCHTKBcPZsnii8HdxvTnkIrML40+SfTQ5WJjnnL5n7slCGd4roW6Ha4XX/axYnr95K/VTEfViq1ZIIqIoFaQjNZXhVilB3/bSmLWsM49s5eTjWeqw2vl+J0OrGQmxXNfmIJC612oSVi+sJU8Z8xPxxbAO8rbchh4WG6krbz0CNZe8sMPm/F8grCONvYsqHSReO8M0DwQGAMsJ/azCmbQMXs/SzSC4U3Cbmhy28qyz6G4rd7DqywRngkaOjpBGRHmsuHeeYVILPklQsxPTSN2BKLqYUL6MeWiWq9kPArnwFQL1jG18VS573GLkDxfwxgP4+qg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fzqIL8zpWDnBKXDLraQ7F6o+6lOHYZLXxQvnnhdcuhY9aWPeV6VNZfF7W2Fu58aX/Is8nBpgbVnfMaeOfsgecb0511aMgeA9MvvpsrgYaBFGYrhvhde0K4LvP8Z9wrmuAIEBX+TccZG0lPJwtNkYPHQT4Z0x2KXU6FV4FLSC0GUFvvbYoe3dYpBjCKgzGY/BN7FLPop9uyuP+aZt+ro5ELH27OfC4jMqfEBeCy1QDG0atYdg8UtHMlBneGbjaYXs1cjjIMJenWZCbHZLQSJcD5eSHIp+Bt6biUTe6jQgfpRL0UPz7MlP3OyQgB8QrM16TmVcncHec3j+J/HlBnfBTA==
  • Cc: <sstabellini@xxxxxxxxxx>, Victor Lira <victorm.lira@xxxxxxx>, "George Dunlap" <george.dunlap@xxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Fri, 21 Jun 2024 20:00:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Victor Lira <victorm.lira@xxxxxxx>

Rule 8.8: "The static storage class specifier shall be used in all
declarations of objects and functions that have internal linkage"

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

Reported-by: Stewart Hildebrand stewart.hildebrand@xxxxxxx
Signed-off-by: Victor Lira <victorm.lira@xxxxxxx>
Acked-by: George Dunlap <george.dunlap@xxxxxxxxx>
---
Changes from v1:
- adjust indentation and line width.
---
Cc: George Dunlap <george.dunlap@xxxxxxxxxx>
Cc: Dario Faggioli <dfaggioli@xxxxxxxx>
Cc: Juergen Gross <jgross@xxxxxxxx>
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
---
 xen/common/sched/credit2.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/xen/common/sched/credit2.c b/xen/common/sched/credit2.c
index 685929c290..b4e03e2a63 100644
--- a/xen/common/sched/credit2.c
+++ b/xen/common/sched/credit2.c
@@ -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;
 
-- 
2.37.6




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.