xen/common/sched/credit2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
From: Victor Lira <victorm.lira@amd.com>
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@amd.com>
Signed-off-by: Victor Lira <victorm.lira@amd.com>
---
Cc: George Dunlap <george.dunlap@citrix.com>
Cc: Dario Faggioli <dfaggioli@suse.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: xen-devel@lists.xenproject.org
---
xen/common/sched/credit2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/common/sched/credit2.c b/xen/common/sched/credit2.c
index 685929c290..10a32bd160 100644
--- a/xen/common/sched/credit2.c
+++ b/xen/common/sched/credit2.c
@@ -1476,7 +1476,7 @@ 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,
+static void burn_credits(struct csched2_runqueue_data *rqd, struct csched2_unit *svc,
s_time_t now);
static inline void
@@ -1855,7 +1855,7 @@ 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,
+static void burn_credits(struct csched2_runqueue_data *rqd,
struct csched2_unit *svc, s_time_t now)
{
s_time_t delta;
--
2.37.6
On Fri, Jun 21, 2024 at 1:21 AM <victorm.lira@amd.com> wrote: > > From: Victor Lira <victorm.lira@amd.com> > > 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@amd.com> > Signed-off-by: Victor Lira <victorm.lira@amd.com> With the changes noted already: Acked-by: George Dunlap <george.dunlap@cloud.com>
On 21.06.2024 02:20, victorm.lira@amd.com wrote: > --- a/xen/common/sched/credit2.c > +++ b/xen/common/sched/credit2.c > @@ -1476,7 +1476,7 @@ 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, > +static void burn_credits(struct csched2_runqueue_data *rqd, struct csched2_unit *svc, > s_time_t now); On top of Andrew's comment, please also obey to line length restrictions. This thus needs re-wrapping, to either static void burn_credits(struct csched2_runqueue_data *rqd, struct csched2_unit *svc, s_time_t now); (then matching the function definition) or static void burn_credits( struct csched2_runqueue_data *rqd, struct csched2_unit *svc, s_time_t now); Jan
On 21/06/2024 1:20 am, victorm.lira@amd.com wrote: > diff --git a/xen/common/sched/credit2.c b/xen/common/sched/credit2.c > index 685929c290..10a32bd160 100644 > --- a/xen/common/sched/credit2.c > +++ b/xen/common/sched/credit2.c > @@ -1476,7 +1476,7 @@ 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, > +static void burn_credits(struct csched2_runqueue_data *rqd, struct csched2_unit *svc, > s_time_t now); > > static inline void > @@ -1855,7 +1855,7 @@ 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, > +static void burn_credits(struct csched2_runqueue_data *rqd, > struct csched2_unit *svc, s_time_t now) Thankyou for the patch. By and large it's fine, but for both of these examples, please re-indent the following line too, so the parameter list remains aligned in the eventual code. ~Andrew
© 2016 - 2024 Red Hat, Inc.