From patchwork Tue Aug 1 07:05:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13335852 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 2D669EB64DD for ; Tue, 1 Aug 2023 07:05:54 +0000 (UTC) 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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, ...) {} /* 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))); #define printk_once(fmt, args...) \ @@ -91,9 +91,9 @@ extern void printk(const char *format, ...) } \ }) -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); struct cpu_user_regs; -void cf_check dump_execstate(struct cpu_user_regs *); +void cf_check dump_execstate(struct cpu_user_regs *regs); void init_constructors(void);