From patchwork Tue Aug 1 09:46:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13336113 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6D592EB64DD for ; Tue, 1 Aug 2023 09:47:06 +0000 (UTC) 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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) 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); #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) = (spinlock_t)SPIN_LOCK_UNLOCKED) 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);