From nobody Wed May 15 15:52:07 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 1690883233009967.4945333953717; Tue, 1 Aug 2023 02:47:13 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.574016.899182 (Exim 4.92) (envelope-from ) id 1qQlxy-0007GZ-3x; Tue, 01 Aug 2023 09:46:58 +0000 Received: by outflank-mailman (output) from mailman id 574016.899182; Tue, 01 Aug 2023 09:46:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qQlxy-0007GS-0c; Tue, 01 Aug 2023 09:46:58 +0000 Received: by outflank-mailman (input) for mailman id 574016; Tue, 01 Aug 2023 09:46:56 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qQlxw-0007G2-JC for xen-devel@lists.xenproject.org; Tue, 01 Aug 2023 09:46:56 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 58787a72-3050-11ee-b259-6b7b168915f2; Tue, 01 Aug 2023 11:46:55 +0200 (CEST) Received: from Dell.homenet.telecomitalia.it (host-79-35-203-138.retail.telecomitalia.it [79.35.203.138]) by support.bugseng.com (Postfix) with ESMTPSA id EE4FA4EE0737; Tue, 1 Aug 2023 11:46:52 +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: 58787a72-3050-11ee-b259-6b7b168915f2 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH] xen/spinlock: address violations of MISRA C:2012 Rules 8.2 and 8.3 Date: Tue, 1 Aug 2023 11:46:46 +0200 Message-Id: <29b6a47a2711f065c02a3d2d94e1a201986cf015.1690882872.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: 1690883234331100001 Content-Type: text/plain; charset="utf-8" Give a name to unnamed parameters to address violations of MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with named parameters"). Keep consistency between parameter names and types used in function declarations and the ones used in the corresponding function definitions, thus addressing violations of MISRA C:2012 Rule 8.3 ("All declarations of an object or function shall use the same names and type qualifiers"). No functional changes. Signed-off-by: Federico Serafini Acked-by: Jan Beulich --- xen/include/xen/spinlock.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/include/xen/spinlock.h b/xen/include/xen/spinlock.h index 0a02a527dc..4a1c155e96 100644 --- a/xen/include/xen/spinlock.h +++ b/xen/include/xen/spinlock.h @@ -125,8 +125,9 @@ struct lock_profile_qhead { } while(0) =20 void _lock_profile_register_struct( - int32_t, struct lock_profile_qhead *, int32_t); -void _lock_profile_deregister_struct(int32_t, struct lock_profile_qhead *); + int32_t type, struct lock_profile_qhead *qhead, int32_t idx); +void _lock_profile_deregister_struct(int32_t type, + struct lock_profile_qhead *qhead); =20 #define lock_profile_register_struct(type, ptr, idx) = \ _lock_profile_register_struct(type, &((ptr)->profile_head), idx) @@ -178,7 +179,7 @@ typedef struct spinlock { #define spin_lock_init(l) (*(l) =3D (spinlock_t)SPIN_LOCK_UNLOCKED) =20 void _spin_lock(spinlock_t *lock); -void _spin_lock_cb(spinlock_t *lock, void (*cond)(void *), void *data); +void _spin_lock_cb(spinlock_t *lock, void (*cb)(void *), void *data); void _spin_lock_irq(spinlock_t *lock); unsigned long _spin_lock_irqsave(spinlock_t *lock); =20 --=20 2.34.1