From nobody Sat May 18 13:16:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1696498010939907.5730073732386; Thu, 5 Oct 2023 02:26:50 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.612922.953104 (Exim 4.92) (envelope-from ) id 1qoKco-0006zC-Ih; Thu, 05 Oct 2023 09:26:30 +0000 Received: by outflank-mailman (output) from mailman id 612922.953104; Thu, 05 Oct 2023 09:26:30 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qoKco-0006z3-Fa; Thu, 05 Oct 2023 09:26:30 +0000 Received: by outflank-mailman (input) for mailman id 612922; Thu, 05 Oct 2023 09:26:29 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qoKcn-0006ys-0u for xen-devel@lists.xenproject.org; Thu, 05 Oct 2023 09:26:29 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 421abcde-6361-11ee-9b0d-b553b5be7939; Thu, 05 Oct 2023 11:26:26 +0200 (CEST) Received: from Dell.homenet.telecomitalia.it (host-87-11-204-216.retail.telecomitalia.it [87.11.204.216]) by support.bugseng.com (Postfix) with ESMTPSA id 437544EE0737; Thu, 5 Oct 2023 11:26:26 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 421abcde-6361-11ee-9b0d-b553b5be7939 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , George Dunlap , Dario Faggioli , Stefano Stabellini , Henry Wang Subject: [XEN PATCH] xen/sched: address violations of MISRA C:2012 Rule 8.2 Date: Thu, 5 Oct 2023 11:26:20 +0200 Message-Id: <142049155775072b2a43eb2f052ffd0ab322867e.1696497380.git.federico.serafini@bugseng.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1696498012766100001 Content-Type: text/plain; charset="utf-8" Add missing parameter names. No functional change. Signed-off-by: Federico Serafini --- xen/common/sched/private.h | 93 ++++++++++++++++++++------------------ 1 file changed, 49 insertions(+), 44 deletions(-) diff --git a/xen/common/sched/private.h b/xen/common/sched/private.h index c516976c37..68de469537 100644 --- a/xen/common/sched/private.h +++ b/xen/common/sched/private.h @@ -280,59 +280,64 @@ struct scheduler { =20 int (*global_init) (void); =20 - int (*init) (struct scheduler *); - void (*deinit) (struct scheduler *); + int (*init) (struct scheduler *s); + void (*deinit) (struct scheduler *s); =20 - void (*free_udata) (const struct scheduler *, void *); - void * (*alloc_udata) (const struct scheduler *, - struct sched_unit *, void *); - void (*free_pdata) (const struct scheduler *, void *, int); - void * (*alloc_pdata) (const struct scheduler *, int); - void (*deinit_pdata) (const struct scheduler *, void *, int); + void (*free_udata) (const struct scheduler *s, void *data); + void * (*alloc_udata) (const struct scheduler *s, + struct sched_unit *unit, void *data); + + void (*free_pdata) (const struct scheduler *s, + void *data, int cpu); + void * (*alloc_pdata) (const struct scheduler *s, int cpu); + void (*deinit_pdata) (const struct scheduler *s, + void *pcpu, int cpu); =20 /* Returns ERR_PTR(-err) for error, NULL for 'nothing needed'. */ - void * (*alloc_domdata) (const struct scheduler *, struct domai= n *); + void * (*alloc_domdata) (const struct scheduler *s, + struct domain *d); /* Idempotent. */ - void (*free_domdata) (const struct scheduler *, void *); + void (*free_domdata) (const struct scheduler *s, void *data); =20 - spinlock_t * (*switch_sched) (struct scheduler *, unsigned int, - void *, void *); + spinlock_t * (*switch_sched) (struct scheduler *s, unsigned int cpu, + void *pdata, void *vdata); =20 /* Activate / deactivate units in a cpu pool */ - void (*insert_unit) (const struct scheduler *, - struct sched_unit *); - void (*remove_unit) (const struct scheduler *, - struct sched_unit *); - - void (*sleep) (const struct scheduler *, - struct sched_unit *); - void (*wake) (const struct scheduler *, - struct sched_unit *); - void (*yield) (const struct scheduler *, - struct sched_unit *); - void (*context_saved) (const struct scheduler *, - struct sched_unit *); - - void (*do_schedule) (const struct scheduler *, - struct sched_unit *, s_time_t, + void (*insert_unit) (const struct scheduler *s, + struct sched_unit *unit); + void (*remove_unit) (const struct scheduler *s, + struct sched_unit *unit); + + void (*sleep) (const struct scheduler *s, + struct sched_unit *unit); + void (*wake) (const struct scheduler *s, + struct sched_unit *unit); + void (*yield) (const struct scheduler *s, + struct sched_unit *unit); + void (*context_saved) (const struct scheduler *s, + struct sched_unit *unit); + + void (*do_schedule) (const struct scheduler *s, + struct sched_unit *unit, s_time_t now, bool tasklet_work_scheduled); =20 - struct sched_resource *(*pick_resource)(const struct scheduler *, - const struct sched_unit *); - void (*migrate) (const struct scheduler *, - struct sched_unit *, unsigned int); - int (*adjust) (const struct scheduler *, struct domai= n *, - struct xen_domctl_scheduler_op *); - void (*adjust_affinity)(const struct scheduler *, - struct sched_unit *, - const struct cpumask *, - const struct cpumask *); - int (*adjust_global) (const struct scheduler *, - struct xen_sysctl_scheduler_op *); - void (*dump_settings) (const struct scheduler *); - void (*dump_cpu_state) (const struct scheduler *, int); - void (*move_timers) (const struct scheduler *, - struct sched_resource *); + struct sched_resource *(*pick_resource)(const struct scheduler *s, + const struct sched_unit *unit); + void (*migrate) (const struct scheduler *s, + struct sched_unit *unit, unsigned int = cpu); + int (*adjust) (const struct scheduler *s, + struct domain *d, + struct xen_domctl_scheduler_op *op); + void (*adjust_affinity)(const struct scheduler *s, + struct sched_unit *unit, + const struct cpumask *hard, + const struct cpumask *soft); + int (*adjust_global) (const struct scheduler *s, + struct xen_sysctl_scheduler_op *op); + void (*dump_settings) (const struct scheduler *s); + void (*dump_cpu_state) (const struct scheduler *s, int cpu); + void (*move_timers) (const struct scheduler *s, + struct sched_resource *sr); }; =20 static inline int sched_init(struct scheduler *s) --=20 2.34.1