From nobody Thu May 16 07:12:38 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 1690873573402175.71212277481254; Tue, 1 Aug 2023 00:06:13 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.573713.898672 (Exim 4.92) (envelope-from ) id 1qQjRd-00032r-HL; Tue, 01 Aug 2023 07:05:25 +0000 Received: by outflank-mailman (output) from mailman id 573713.898672; Tue, 01 Aug 2023 07:05:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qQjRd-00032k-EU; Tue, 01 Aug 2023 07:05:25 +0000 Received: by outflank-mailman (input) for mailman id 573713; Tue, 01 Aug 2023 07:05:24 +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 1qQjRb-00032e-VD for xen-devel@lists.xenproject.org; Tue, 01 Aug 2023 07:05:23 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id c7d1b24a-3039-11ee-b259-6b7b168915f2; Tue, 01 Aug 2023 09:05:22 +0200 (CEST) Received: from Dell.bugseng.com.homenet.telecomitalia.it (host-79-35-203-138.retail.telecomitalia.it [79.35.203.138]) by support.bugseng.com (Postfix) with ESMTPSA id 63F004EE0737; Tue, 1 Aug 2023 09:05:21 +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: c7d1b24a-3039-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/lib: address violations of MISRA C:2012 Rules 8.2 and 8.3 Date: Tue, 1 Aug 2023 09:05:07 +0200 Message-Id: <18adbd526ec48a83ace2d9049671d3abd2f9c45b.1690873427.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: 1690873574628100001 Content-Type: text/plain; charset="utf-8" Give a name to unnamed parameters thus addressing 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/lib.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h index 359cfdc784..8eef557dd5 100644 --- a/xen/include/xen/lib.h +++ b/xen/include/xen/lib.h @@ -78,7 +78,7 @@ debugtrace_printk(const char *fmt, ...) {} =20 /* Allows us to use '%p' as general-purpose machine-word format char. */ #define _p(_x) ((void *)(unsigned long)(_x)) -extern void printk(const char *format, ...) +extern void printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); =20 #define printk_once(fmt, args...) \ @@ -91,9 +91,9 @@ extern void printk(const char *format, ...) } \ }) =20 -extern void guest_printk(const struct domain *d, const char *format, ...) +extern void guest_printk(const struct domain *d, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); -extern void noreturn panic(const char *format, ...) +extern void noreturn panic(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); extern int __printk_ratelimit(int ratelimit_ms, int ratelimit_burst); extern int printk_ratelimit(void); @@ -173,7 +173,7 @@ extern char *print_tainted(char *str); extern void add_taint(unsigned int taint); =20 struct cpu_user_regs; -void cf_check dump_execstate(struct cpu_user_regs *); +void cf_check dump_execstate(struct cpu_user_regs *regs); =20 void init_constructors(void); =20 --=20 2.34.1