From nobody Fri May 17 09:18:40 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 1709898735852528.2329354503751; Fri, 8 Mar 2024 03:52:15 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.690252.1076086 (Exim 4.92) (envelope-from ) id 1riYlb-0006jr-Iz; Fri, 08 Mar 2024 11:51:59 +0000 Received: by outflank-mailman (output) from mailman id 690252.1076086; Fri, 08 Mar 2024 11:51:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1riYlb-0006jk-EB; Fri, 08 Mar 2024 11:51:59 +0000 Received: by outflank-mailman (input) for mailman id 690252; Fri, 08 Mar 2024 11:51:58 +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 1riYla-0006je-4y for xen-devel@lists.xenproject.org; Fri, 08 Mar 2024 11:51:58 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 43e1142b-dd42-11ee-afda-a90da7624cb6; Fri, 08 Mar 2024 12:51:57 +0100 (CET) Received: from truciolo.homenet.telecomitalia.it (host-82-58-32-177.retail.telecomitalia.it [82.58.32.177]) by support.bugseng.com (Postfix) with ESMTPSA id 797D54EE0738; Fri, 8 Mar 2024 12:51:56 +0100 (CET) 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: 43e1142b-dd42-11ee-afda-a90da7624cb6 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/evtchn: address violations of MISRA C:2012 Rules 16.3 and 16.4 Date: Fri, 8 Mar 2024 12:51:49 +0100 Message-Id: <3ec419e30227a8016c28e04524cd36a549aaddcf.1709898466.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: 1709898737467100001 Content-Type: text/plain; charset="utf-8" Add missing break statements to address violations of MISRA C:2012 Rule 16.3 ("An unconditional `break' statement shall terminate every switch-clause"). Add missing default cases to address violations of MISRA C:2012 Rule 16.4 (Every `switch' statement shall have a `default' label). No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini --- xen/common/event_channel.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index 15aec5dcbb..cf19020e49 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -130,9 +130,12 @@ static bool virq_is_global(unsigned int virq) =20 case VIRQ_ARCH_0 ... VIRQ_ARCH_7: return arch_virq_is_global(virq); + + default: + ASSERT(virq < NR_VIRQS); + break; } =20 - ASSERT(virq < NR_VIRQS); return true; } =20 @@ -846,6 +849,7 @@ int evtchn_send(struct domain *ld, unsigned int lport) break; default: ret =3D -EINVAL; + break; } =20 out: @@ -1672,6 +1676,9 @@ static void domain_dump_evtchn_info(struct domain *d) case ECS_VIRQ: printk(" v=3D%d", chn->u.virq); break; + default: + /* Nothing to do in other cases. */ + break; } =20 ssid =3D xsm_show_security_evtchn(d, chn); --=20 2.34.1